Skip to content

Acceptance Tests

Safety

  1. Dirty repo is never mutated

    • Given staged/unstaged/untracked changes
    • When daemon sync runs
    • Then no checkout/pull/delete occurs
    • And skip reason is logged
  2. No destructive git commands

    • Verify sync paths do not invoke reset/force-delete/force-checkout operations.
  3. Branch deletion protection

    • Given local branch has commits not on upstream/default
    • When stale cleanup is evaluated
    • Then branch is not deleted and reason is logged

Sync Behavior

  1. Default branch discovery

    • Repo default branch is main or master (or custom)
    • Tool resolves it correctly each run
  2. Current branch fast-forward

    • Given current branch behind upstream and clean worktree
    • Tool fast-forwards successfully
  3. Default branch update

    • Given local default branch behind remote
    • Tool updates default branch local ref safely
  4. Non-fast-forward situation

    • Given divergence/conflict
    • Tool skips mutation and logs clear remediation hint

Stale Branch Cleanup

  1. Checked-out stale branch cleanup

    • Given checked-out feature branch merged into default
    • And no unique commits exist
    • Tool switches to default and deletes local stale branch
    • Tool also deletes other local branches that are already merged and safe
    • If branch still has unique commits, cleanup is skipped with explicit reason code
  2. Not merged branch preserved

    • Given branch not merged into default
    • Tool never deletes branch

Platform and Service

  1. Linux service registration

    • Install/register daemon for user and system modes
    • Start/stop/status actions work
    • Install/uninstall scripts are idempotent and privilege-aware
  2. Windows service/task registration

    • Install/register in supported mode
    • Start/stop/status actions work
    • Task registration validates creation and allows idempotent uninstall
  3. CLI parity

    • Every TUI action has a CLI equivalent
    • CLI can perform all daemon actions
    • Parity set includes sync all, cache refresh, and trace drill-down

Auth and Security

  1. PAT login and validation

    • Valid PAT succeeds for GitHub and Azure
    • Invalid PAT rejected with actionable error
  2. Secret redaction

    • Tokens are never shown in logs/events/TUI

Update

  1. Self-update success path

    • Tool checks and applies update with checksum validation
    • Release manifest and checksums are published for linux/windows artifacts
  2. Self-update rollback path

    • Simulated failed replace recovers prior executable safely
    • Trace/event reason codes include update start/success/fail/rollback

Logging and Traceability

  1. Traceability from day one

    • Every daemon sync run has a trace/run ID
    • Repo-level actions are linked to the same trace/run ID
    • CLI can query trace details
  2. Skip/action reason logging

    • Every skipped mutation includes explicit reason code and human-readable reason
    • TUI/CLI can list recent events with timestamps
    • Reason codes follow a standardized taxonomy across git safety, sync, scheduler, and update paths
    • CLI supports machine-readable audit exports (json/csv) for events/traces/stats

Multi-Source Accounts

  1. Multiple active sources

    • Configure at least two GitHub sources and two Azure sources concurrently
    • Sync operations resolve the correct source credentials per repository
  2. Personal and organization contexts

    • Repositories from personal/private accounts and org/team accounts both sync successfully

Workspace and Persistence

  1. Managed workspace layout

    • Repositories are placed under deterministic provider/account/repo paths
    • CLI can validate and report layout drift
  2. Persistence separation

    • Non-sensitive data persists in config file and/or local DB
    • Sensitive data exists only in OS credential manager (or secure fallback)

Operational Readiness

  1. Incident runbook coverage

    • Incident procedures exist for auth failures, lock contention, and update rollback
    • Troubleshooting guidance maps observed reason codes to concrete operator actions
  2. Scheduler fairness at scale

    • Given a large multi-source workspace (high repository count)
    • When one full scheduler cycle runs
    • Then each source receives execution opportunities without starvation
    • And completion counts match configured repository distribution
  3. Governance policy enforcement and diagnostics

    • Given repository governance policies are configured
    • When sync is attempted for a policy-denied repository
    • Then sync is skipped with explicit policy_* reason code and no mutation
    • And syncctl doctor reports governance/source-policy drift with remediation hints
  4. CLI/TUI parity matrix guardrail

    • A machine-readable CLI/TUI parity matrix exists.
    • CI fails if syncctl top-level command groups are not represented in the matrix.
    • CI fails if matrix-mapped TUI palette commands are missing.

Verification Mapping

Each acceptance item is mapped to a primary automated/manual verification path for release closure.

IDPrimary VerificationType
1go test ./internal/core/git/... ./internal/core/sync/... + integration dirty-repo scenariosautomated
2go test ./internal/core/git/... + code review of git client operationsautomated + manual review
3go test ./internal/core/git/... (cleanup/branch protection tests)automated
4go test ./internal/core/providers/... ./internal/core/sync/...automated
5go test ./internal/core/sync/... ./internal/core/git/...automated
6go test ./internal/core/sync/... ./internal/core/git/...automated
7go test ./internal/core/sync/... + trace/event assertionsautomated
8go test ./internal/core/git/... + integration stale-branch flowsautomated
9go test ./internal/core/git/...automated
10go test ./internal/core/install/... ./tests/integration/... (linux install scripts + service tests)automated
11go test ./internal/core/install/... ./tests/integration/... (windows task tests)automated
12go test ./cmd/syncctl/... ./internal/ui/tui/... + CLI/TUI parity spot checkautomated + manual
13go test ./internal/core/providers/... ./cmd/syncctl/...automated
14go test ./internal/core/logging/... ./internal/core/telemetry/... + manual log inspection sampleautomated + manual
15go test ./internal/core/update/... ./cmd/syncctl/... + release artifact checksautomated
16go test ./internal/core/update/... ./cmd/syncctl/... (rollback tests)automated
17go test ./internal/core/daemon/... ./cmd/syncctl/... (trace/run state tests)automated
18go test ./internal/core/telemetry/... ./cmd/syncctl/... ./internal/ui/tui/...automated
19go test ./internal/core/providers/... ./internal/core/sync/... ./tests/integration/...automated
20go test ./internal/core/providers/... ./tests/integration/... + org/personal source config validationautomated + manual
21go test ./internal/core/workspace/... ./cmd/syncctl/...automated
22go test ./internal/core/auth/... ./internal/core/state/... + manual credential-store check on target OSautomated + manual
23Manual runbook review in docs/operations/incident-response-playbook.md and docs/operations/service-operations-guide.mdmanual
24go test ./internal/core/daemon/... ./tests/integration/... (scale fairness tests)automated
25go test ./internal/core/sync/... ./cmd/syncctl/... ./tests/integration/... (policy enforcement + doctor governance diagnostics)automated
26go test ./tests/integration/parity/... + matrix file reviewautomated + manual

Release candidate closure requires all automated checks green and all manual checks signed in docs/release/release-candidate-checklist.md.