Skip to content

feat(scan): record bundled instruction digests in scan manifests - #2263

Open
mldangelo-oai wants to merge 70 commits into
mdangelo/codex/findings-history-discoveryfrom
mdangelo/codex/scan-instruction-digest
Open

mldangelo-oai wants to merge 70 commits into
mdangelo/codex/findings-history-discoveryfrom
mdangelo/codex/scan-instruction-digest

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two scans can report the same plugin version while using different bundled instructions. Record the SHA-256 of the selected instructions in sealed Standard and Deep scan manifests so their instruction provenance can be compared. Addresses #2242; stacked on #275.

Changes

The optional scan.producer.instructionDigests field records hashes derived from the relative paths and exact bytes of bundled Markdown under skills/ and references/. Registration measures the bundle the scan can read, including the staged Windows copy. Custom validation includes a digest when the selected sources match the bytes used to build its discovery prompt.

Deep coordinators measure their bundle while claiming a lease. Each worker records that measurement when it first starts, and a replacement coordinator can contribute a different bundle after resume. Persisted measurements follow sealing, history, export, recovery, and remediation without changing an already accepted report's producer metadata.

Migration 76 preserves saved measurements and known instruction-digest preview receipts. Repository documentation explains the digest scope and independent reproduction. The published scan-results page could show these digests beside the plugin version. No public command, flag, environment variable, or default changes.

Testing

  • At c9aaeb1b, all five ordered portable plugin checks passed: Ruff check, Ruff format check, SDK build:ci, plugin source compatibility, and its Node tests. The isolated receiving preflight and 27 runtime controls passed, including full native sandbox assertions and physical repository paths.
  • At c9aaeb1b, the ordered SDK sequence passed: fixed seed 12345, types, formatting, then default test:ci. Each full test run reported 13,375 passed, 176 skipped, one todo, and zero failures across 347 files. The default invocation produced JUnit and LCOV covering 332 records.
  • Reused 48 focused Python digest, seal, recovery, and worker tests executed at 51d6dc1c. Their source and transitive inputs are unchanged; the original execution identity is retained.
  • Source CI at c9aaeb1b passed all 65 jobs. Its checkout tree exactly matches that source head. Verified receipts cover full Python, both cold MCP shards, all SDK shards on Linux/macOS/Windows, native validation, installed packages, standalone contracts, and container validation. Linux SDK artifacts contain coverage and JUnit. Product and portable-check inputs remain unchanged at d145bbdc; the subsequent main merge changes two CI installer pins.
  • The affected audit and workflow-quality owners are checked separately against main 35373239 CI. Reused product results keep their original execution identities and do not replace current-head CI.

Risk and rollout

Land #275 before this child. Keep one canonical migration sequence when combining independently numbered migration branches. Released migration numbers remain intact, and known instruction-digest previews are repaired into version 76. Other branches' database histories are not claimed as verified here.

The first digest identifies the bundle selected at registration; Standard resumes retain it. Workers may read only a subset of those files or encounter later edits. Caller prompts, settings, and generated text have separate lifecycles and are outside this digest.

Older seals may omit the optional field, and accepted seals keep their original metadata. A new seal's digest list must match persisted measurements. If a Deep measurement is unavailable when a worker first starts, the scan can finish and omit the list. Imported and mock reports do not acquire the local installation's digest.

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.

@github-actions github-actions Bot added the enhancement New feature or request label Nov 3, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T19:55:07.793674Z d145bbd New commits
🔒 Security Review ✅ Completed 2026-11-22T19:54:36.822704Z d145bbd New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding instruction identity without changing old seals. The bundle selection, worker ownership and recovery paths look sound in this owner-level review. One verification issue needs attention: the new SDK registration test fails on macOS before its first digest assertion; I left an inline comment on its database reader.

Portable checks, builds, types and formatting passed. Exact-tree CI passes the affected Python digest/recovery modules, Linux SDK registration cases, and both MCP shards, including the stdio lifecycle. The overall CI run has a failing macOS shard. Local persistence tests remain limited by filesystem ownership guards; no live model-backed scan was independently run.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the legacy patch-generation call and the migration formatting. The updated source looks sound in this owner-level merge-safety review. The existing macOS registration-test finding still needs a successful rerun: its database reader is unchanged, and the current SDK matrix has not run yet. I am leaving COMMENT until that verification is resolved; this is not evidence of a production digest-calculation defect.

Portable checks, builds, types, digest/schema tests and focused MCP tests passed; unchanged-source results were carried forward after inspecting the two-file delta. Current-head formatting and macOS/Windows Python CI pass, including the repaired remediation cases. Local persistence tests remain limited by filesystem ownership guards. No live model-backed scan or full local SDK pass is claimed.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the registration test’s database reader and preserving instruction measurements through the native deduplication integration. No blocking findings in this owner-level merge-safety rereview. The test now uses the Python workbench database-path resolver and registration environment, addressing the previous Bun SQLite path failure; the digest, migration and historical-manifest behavior remains intact.

Validation: fresh locked dependencies, ordered portable checks, SDK/plugin builds, types/format, 180 Python tests plus 170 subtests, and 15 focused MCP tests passed. Current macOS/Windows Python CI passes the repaired remediation cases. The macOS SDK registration rerun is still pending. Local registration remains blocked by filesystem ownership checks, and one packaging test’s strict stderr assertion sees an environment-injected warning; neither is reported as passing. No full local SDK suite or live model-backed scan is claimed.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for preserving instruction identity across registration, interrupted workers, and sealed-result recovery. I found no blocking issue in the updated implementation; there is one nonblocking documentation clarification inline.

Builds, types/format, portable checks, focused MCP/digest/schema tests, and independent migration checks passed. Current-tree Python CI passes on Linux, macOS, and Windows, including the affected digest and seal cases on Linux. Local seal integration checks hit filesystem ownership restrictions, and the local stdio lifecycle check timed out before its worker started; the remaining native/SDK matrix was still running when reviewed.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for preserving instruction measurements through the shared-fixture update. No blocking findings; the existing discovery-template documentation suggestion remains nonblocking. Seventeen Python digest/schema tests, the focused MCP suites and SDK discovery-prompt check passed, along with builds, types, formatting and portable checks. SDK registration checks remain blocked by filesystem ownership guards. Earlier seal and platform verification remains historical; no full current-head suite or live-model scan is claimed.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for preserving instruction measurements through the main integration. No blocking findings; the existing documentation suggestion remains nonblocking. Seventeen Python digest/schema tests, the MCP store/template checks and two coordinator stop cases pass, together with current plugin/SDK builds, types, formatting and portable checks. Earlier full registration, seal and platform results retain their original limits.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants