Skip to content

Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357

Closed as not planned
Closed as not planned

Description

@jyaunches

Phase 11: Final Audit Reconciliation

Parent epic: #3588

Goal

Final reconciliation of the audit-coverage work. Every audit row must be evidence-complete or audit-amended with reviewer-visible rationale; every placeholder/no-op assertion group must be removed, implemented, or independently amended out of scope; deterministic final reports must reconcile scenario contracts, expected states, suite steps, assertion modules, and evidence reports without deleting legacy executable E2E tests.

Audit rows in scope

AQ Phase Subject Required coverage Boundary Planned scenario/assertion
AQ-063 11 test/e2e/docs/*, coverage reports, expected states, scenarios, suites metadata Final reports reconcile all queue rows, expected states, suite steps, scenario metadata — without deleting legacy scripts. host CLI final reconciliation report assertions
AQ-064 11 Placeholder/probe-only typed assertions Placeholder assertion groups removed, implemented, or independently amended out of scope. host CLI placeholder cleanup assertions
AQ-065 11 Legacy script deletion readiness Legacy scripts remain until every queue row is evidence-complete or audit-amended with reviewer-visible rationale. host CLI deletion readiness assertion

Reconciliation tasks

  • Remove, replace, or independently amend every placeholder assertion group that would otherwise hide an audit row
  • Reconcile docs/e2e-audit-work-queue.md against final scenario contracts, expected states, suite steps, assertion modules, and evidence reports
  • Update minimal test/e2e-scenario/docs/README.md and MIGRATION.md sections needed to explain how to run the migrated coverage and read the audit-row report
  • Resolve TODOs introduced by this implementation
  • Generate deterministic final coverage + audit-row report
  • Do not delete legacy executable E2E tests in this phase — list deletion candidates only

Required deliverables

Reports

  • test/e2e-scenario/runtime/reports/final-audit-row-report.json (machine-readable)
  • test/e2e-scenario/runtime/reports/final-audit-row-report.md (human-readable)
  • Reports byte-identical across two consecutive runs (deterministic)

Docs

  • test/e2e-scenario/docs/README.md updated with: contract model, status vocabulary, final wave status
  • test/e2e-scenario/docs/MIGRATION.md updated with: current migration state, deletion-readiness criteria

Hygiene tests

  • Vitest test that fails if any queue row is marked complete with metadata-only evidence
  • Vitest test that fails if any unresolved row lacks an owner / follow-up
  • Vitest test that fails if any placeholder/no-op assertion group remains marked complete
  • Vitest test that fails if any legacy test/e2e/test-*.sh is deleted in this phase

Validation scenarios — all must pass in PR workflow artifacts

Scenario 11.1 — Final work queue has no completed metadata-only or ownerless unresolved entries (Happy Path)

  • Given docs/e2e-audit-work-queue.md and final scenario evidence reports available.
  • When Final hygiene validation runs.
  • Then No metadata-only row is presented as complete audit coverage; every unresolved row has owner/follow-up; completed rows have executable evidence or independent audit amendment rationale.
  • Steps
    1. Read queue rows AQ-001…AQ-065; collect final PR workflow evidence reports.
    2. Run final hygiene tests in workflow.
    3. Verify every queue row is present in PR workflow evidence with evidence-complete or approved audit-amended; no completed metadata-only rows; no ownerless unresolved rows remain.

Scenario 11.2 — Placeholder assertion groups are removed, implemented, or independently amended out of scope (Sad Path)

  • Given A placeholder/no-op assertion group remains and is marked complete.
  • When Final hygiene validation runs.
  • Then Validation fails until the placeholder is removed, replaced by a real module, or covered by an independent audit amendment rationale.
  • Steps
    1. Filter rows AQ-063…AQ-065; leave or inject placeholder assertion group in final metadata.
    2. Run final hygiene tests.
    3. Verify failure; placeholder group named; affected queue rows unresolved until real module or approved amendment exists.

Scenario 11.3 — Docs and deterministic reports are updated without deleting legacy scripts (Happy Path)

  • Given Implementation is complete and legacy scripts remain in place.
  • When Docs and reports are checked.
  • Then test/e2e-scenario/docs/README.md and test/e2e-scenario/docs/MIGRATION.md document contract model/status vocabulary/final wave status; generated reports are deterministic; legacy script deletion candidates are listed but scripts are not deleted.
  • Steps
    1. Filter rows AQ-063…AQ-065; render reports twice; list legacy test/e2e/test-*.sh scripts; collect PR workflow artifacts.
    2. Compare report outputs and run docs hygiene tests.
    3. Verify rows evidence-complete only when artifacts prove docs contain required sections, reports are byte-identical, legacy scripts still exist.

Acceptance criteria — issue is NOT DONE until ALL are true

  1. PR landed in test/e2e-scenario/ with reports, docs, and hygiene tests above.
  2. PR CI passing:
    • All hygiene tests pass
    • Report deterministic (byte-identical across two runs)
    • No queue row marked evidence-complete without stable assertion ID + evidence path
    • No unresolved row without owner / follow-up
  3. Validation Scenarios 11.1–11.3 all pass in PR workflow artifacts.
  4. Audit work queue final pass: every row AQ-001 through AQ-062 is evidence-complete or audit-amended with reviewer-visible rationale; AQ-063/064/065 flipped to evidence-complete.
  5. Phase-specific validation gate (from spec): no metadata-only entry presented as satisfying an audit row; no unresolved audit row remains without owner / follow-up; all fixture cleanup/restore obligations documented and tested; legacy executable E2E tests remain in place — deletion is outside this spec.
  6. No-cheat gate: zero metadata-only completions.
  7. Legacy preservation gate: every legacy test/e2e/test-*.sh from the spec's in-scope list still exists in the repo.
  8. PR description references AQ-063/064/065, links this issue.

Dependencies

  • All of Phases 1–10 must be evidence-complete before this phase can complete.
  • Audit work queue rows AQ-001 through AQ-062 fully resolved.

Out of scope

  • Legacy script deletion (handled as a separate later approval, outside this scope)
  • New scenario coverage (must be added in earlier phases or as audit amendment)

Cross-phase acceptance gates (apply to every phase)

  1. Setup gate — scenario contract declares environment, manifest or no-manifest reason, fixtures, runtime actions, assertions.
  2. No-cheat gate — preview/dry-run output cannot mark an audit row complete.
  3. Boundary gate — assertions touch the same SUT boundary as the legacy script.
  4. Evidence gate — every assertion emits an evidence path and stable assertion ID.
  5. Secret gate — no manifest, log, report, or fixture file contains raw secrets.
  6. Cleanup gate — fixtures that mutate host or repo state have restore/cleanup logic and tests.
  7. Audit completeness gate — every assigned audit row has owner, planned scenario/assertion, phase assignment, evidence status.
  8. Phase completion gate — phase complete only when every assigned row has executable evidence (or independent audit amendment).
  9. Executable assertion gate — completed scenarios point to concrete suite steps / assertion modules, not pendingStep(...), TODOs, generic probes, or prose.

Activity

  1. cv commented on Jun 2, 2026

    @cv
    Collaborator

    Tracking update: opened PR #4649 to remove repo-local E2E migration state and keep mutable migration status in GitHub issues/PRs instead.

    This aligns with this phase's final reconciliation role: durable framework guidance stays in repo docs, while current audit-row status, deletion readiness, and follow-up rationale should be tracked here and in the PRs that land each batch.

  2. added
    area: e2e
    enhancement
    and removed on Jun 3, 2026
  3. cv commented on Jun 8, 2026

    @cv
    Collaborator

    Architecture clarification for this audit phase: per #3588 and #4939, read this phase body as acceptance coverage, not as a durable requirement to add or keep YAML resolver or bash-runner deliverables.

    The repo may use YAML/bash as bridge infrastructure while the migration is underway, but phase completion should ultimately be proven in the single scenario runner, with shell limited to host/sandbox/process/platform boundaries where shell is the actual system interface. If a bridge PR lands work for this phase, please record the single-runner porting requirement or explicit deferral on the owning issue/PR thread.

  4. removed
    enhancement
    e2e-audit-phase-11
    on Jun 8, 2026
  5. 1 remaining item

  6. added
    area: docs
    on Jun 9, 2026
  7. cv commented on Jun 9, 2026

    @cv
    Collaborator

    Status update for the Vitest E2E migration stack: implemented #5052, test(e2e): extend migration inventory to scenario runner internals.

    What changed in #5052:

    • Added internalSurfaces to test/e2e-scenario/migration/legacy-inventory.json so final reconciliation tracks coarse legacy runner internals, not only direct test/e2e/test-*.sh entrypoints.
    • Covered the YAML/bash scenario workers, onboarding assertion workers, validation suites, TypeScript shell-runner orchestrators, and runtime helper libraries with deletion-gate records.
    • Extended the framework inventory tests so those internal paths must exist and every file under the tracked legacy roots is covered by an inventory surface before cleanup can proceed.
    • Updated the scenario migration docs to clarify that the inventory is still a deletion gate, not a progress dashboard, but now guards internal runner surfaces too.

    Focused verification passed:
    npx vitest run --project e2e-scenario-framework test/e2e-scenario/framework-tests/e2e-migration-inventory.test.ts test/e2e-scenario/framework-tests/e2e-migration-inventory-lock.test.ts --silent=false --reporter=default

    #5052 remains draft while its base #5046 is still open, but it now has implementation content and CI is running.

  8. cv commented on Jun 9, 2026

    @cv
    Collaborator

    Status update for #5052: the PR now has implementation content and its CI is green.

    Follow-up from the earlier update:

    • Merged the updated test(e2e): add post-reboot-recovery regression guard for #4423 #5046 base, including the accidental node_modules symlink removal.
    • Applied the all-files static-hook formatter fix that CI required.
    • Re-ran focused migration-inventory framework tests locally.
    • Re-ran the CI static-check parity command locally.
    • GitHub CI is passing on the pushed head, including static-checks, checks, CLI shards/aggregate, build-typecheck, plugin tests, CodeQL, WSL, and macOS.

    #5052 remains draft only because its base #5046 is still open. Functionally, the inventory-internals PR is now implemented and green on its stack branch.

  9. cv commented on Jun 9, 2026

    @cv
    Collaborator

    Status update for deletion-readiness tracking: #5055 is implemented, out of draft, and green on head 1673c1f1b54c03a18fbda7c3fb60967ebd4157c6.

    #5055 deliberately does not delete direct legacy executable E2E scripts. Instead, it tightens the #4357 deletion gate for the smoke/onboarding slice:

    • All direct smoke/onboarding test/e2e/test-*.sh rows remain status: "not-migrated" and deletionReady: false until whole-script parity is proven.
    • The narrower legacy-onboarding-assertion-workers internal surface is now recorded as covered by test/e2e-scenario/live/registry-scenarios.test.ts, but also remains deletionReady: false because the YAML/bash bridge and assertion registry still reference those shell files.
    • New inventory tests fail if the direct smoke/onboarding shell scripts disappear early or if the onboarding assertion workers are treated as removable while bridge metadata still consumes them.
    • MIGRATION.md now documents that partial domain coverage can be recorded without making a broad legacy entrypoint deletion-ready.

    Validation:

    • Focused inventory tests passed.
    • Full e2e-scenario-framework suite passed: 27 files / 342 tests.
    • npm run typecheck:cli, touched-file prek hooks, and git diff --check passed locally.
    • GitHub CI and both advisors are green; E2E advisors recommend no live E2E for this docs/test/audit-inventory-only guard.

    This should satisfy the deletion-readiness intent for this slice: record the covered narrow surface, preserve bridge dependencies, and keep executable legacy E2Es in place until final parity evidence exists.

  10. jyaunches commented on Jun 10, 2026

    @jyaunches
    ContributorAuthor

    Closing as superseded by #5098.

    The "final audit reconciliation" framing inherited from #3588 (closed) is replaced by #5098 Phase 8 — KEEP_BASH governance, which lands the deletion guards and quarterly drift audit for permanently-shell tests.

    Note for implementers: This issue is still referenced in test/e2e-scenario/framework-tests/e2e-migration-inventory.test.ts:

    • entry.ownerIssue regex /^#(?:3588|434[7-9]|435[0-7]|4941)$/
    • entry.deletionApprovalIssue hard-coded to "#4357"

    #5098's Phase 0 PR-1 (inventory schema bump) is the natural place to update both — most likely repointing deletionApprovalIssue to #5098 or a Phase 8 sub-issue, and broadening the ownerIssue regex to accept #5098. Closing this issue does not break the test (closed issues remain referenceable by number); the swap is a cleanup task during the schema bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: docsarea: e2e

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions