Skip to content

fix: preserve accepted coverage through publication and recovery - #921

Draft
mldangelo-oai wants to merge 2 commits into
mdangelo/codex/retain-source-remediationsfrom
mdangelo/codex/deep-coverage-review
Draft

mldangelo-oai wants to merge 2 commits into
mdangelo/codex/retain-source-remediationsfrom
mdangelo/codex/deep-coverage-review

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

Deep scan completion currently replaces source coverage with an empty, complete record. A completed reducer can therefore hide an audit's deferred work or unknown coverage.

Carry coverage from accepted audits through reduction, publication and recovery. For example, one complete audit no longer discharges another audit's unresolved hypothesis. Stacked on #905 to preserve its distinct-remediation repair.

Changes

  • Combine accepted coverage in host code and retain each review's worker, attempt, source IDs and receipt paths. Keep coverage bookkeeping out of reducer model input.
  • Publish partial or unknown coverage when accepted sources remain unresolved, and render independent review provenance in the report.
  • Reconstruct legacy coverage in memory without rewriting accepted reducer artifacts. Preserve the legacy persisted shape; retain host coverage only when the existing versioned writer requests it.
  • Keep stopped recovery from suppressing a different worker's unresolved obligation that happens to use the same local candidate ID.
  • Restore the existing versioned validator test: compare every legacy persisted field exactly, check the separate host projection, and require full equality for versioned persistence.

Testing

Final head: f3a30dc81b5afce390f1496ca57404737af368ad.

  • All five required portable checks passed: Ruff lint and format, SDK build:ci, plugin source compatibility and its Node tests.
  • Full MCP suite: 46 passed, 0 failed.
  • Real-workbench publication comparisons: the parent fails all five artifact checks; the correction passes all five, covering partial, unknown and complete coverage, restart, and restart followed by another reducer. Child exit success is checked separately from artifact correctness.
  • Stopped coverage comparisons: parent 3 failed / 2 passed; corrected 5 passed. Existing publication and renderer tests: 67 passed.
  • Existing reducer and child-process tests pass, including fresh and reconstructed reducer contexts. Independent SQLite integrity, foreign-key, stored-input and accepted-artifact checks pass.
  • At the preceding production-identical 0f24bb44: full Python 1,099 passed / 8 skipped, plus 109 subtests; full seeded SDK 3,008 passed / 50 skipped / 0 failed; SDK types, format and plugin build passed.
  • The normal package built at 0f24bb44 passes the unchanged installed SDK and physically detached plugin checker. The final commit changes one unpackaged MCP test only.
  • Final unseeded SDK suite: 3,008 passed / 50 skipped / 0 failed; 69,243 assertions, seed 1102043008. Final formatting passed.

The original full-MCP equality failure is retained. The correction imports the already existing versioned test without changing production behavior or dropping legacy-field assertions. An initial local types check could not write build metadata in its sandbox; the writable isolated check passes.

Risk and rollout

This fixes coverage reporting and recovery; scheduling, saturation counters, artifact retry ownership, commands and permission defaults stay unchanged. Existing finding and distinct-remediation behavior remains covered by the stacked parent.

Legacy accepted files retain their original shape and bytes. Any later writer integration must preserve its existing workflow compatibility, immutable-input receipt ownership and reader-before-writer ordering. This slice adds no migration or new writer activation. Native supported-platform CI remains to be observed. These deterministic tests do not establish scan quality, cost or latency equivalence.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant