Skip to content

feat(doctor): add versioned per-check metadata (HACK-2218 R7a) - #838

Merged
roodboi merged 5 commits into
nextfrom
codex/hack-2218-doctor-contract
Nov 14, 2026
Merged

roodboi merged 5 commits into
nextfrom
codex/hack-2218-doctor-contract

Conversation

@roodboi

@roodboi roodboi commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Doctor's JSON audit now adds data.schema: 1 and per-check area, machine/project scope, and fix: {kind,args,doc_url} inside the existing {ok,data} envelope. Clients can group findings without parsing diagnostic text. Existing statuses, details, payloads, counts and exit codes remain unchanged.

The catalog uses closed IDs/prefixes and own-property lookup. Unknown checks are Other/project/manual with no executable args. Trust findings are admin; no safe repair is advertised until the separate R7b targeted path exists. Mixed secrets-hygiene scope is set from its actual inspection context. This PR changes observation metadata only, so a flow diagram adds no useful behavior detail.

Validation: 125 focused tests across 8 files pass, covering metadata, actual mixed-scope observation in an isolated child, JSON, browser checks, command refusals, env keys, secret integrity, daemon guidance and local-network hints. CLI typecheck and quality, changed-file lint, privacy and docs preparation/check pass (existing complexity warnings only). Same persistent Opus reviewer clean at f884ba3. Exact-head hosted CI and Codex review pending; no Mac or full-suite claim, no manual Mac dispatch.

HACK-2218 / R7a. R7b and R7c will be separate small dependent PRs rooted here to avoid duplicating this contract. Lead owns merging; next.17 merge freeze applies.


Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hack-docs Ready Ready Preview Nov 14, 2026 10:45am UTC

Request Review

@linear-code

linear-code Bot commented Nov 14, 2026

Copy link
Copy Markdown

HACK-2218

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 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-14T10:46:41.600926Z 6e27a9a Manual request
🔒 Security Review ✅ Completed 2026-11-14T10:49:15.741413Z 6e27a9a Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f884ba36e4

ℹ️ 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".

Comment thread src/lib/doctor-metadata.ts Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: f884ba36e4

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Exact-target scope finding fixed and answered/resolved in e27d899. Same persistent Opus reviewer clean; 15 focused JSON/metadata/browser tests / 106 assertions pass. The fix is normally merged through the dependent Doctor branches. @codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: e27d899844

ℹ️ 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 Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: e27d899844

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Head 34ba0248eedb42255e846168b5af31195b2e2521 incorporates the test-only correction for #838's shard 4 failure. Two active/pending adopted-project assertions now explicitly expect R7a's area/scope/fix fields and data.schema:1. Both keep strict whole-object equality and all existing adoption, status/detail, duration, canary and read-only assertions. No product code changed.

Same persistent Opus reviewer clean for the fix and both normal merges. R7a: 13 tests /130 assertions across three files pass. Final stacked head: 21 tests /266 assertions across five files pass, including both adoption cases, machine and selected-fix regressions. Changed-test lint and privacy pass. New exact-head CI/Codex pending; no merge or Mac claim.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 34ba0248ee

ℹ️ 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 Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 34ba0248ee

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Head 6e27a9a2958b2fe29b16d7ab60f9339876c66cd6 carries the type-only follow-up to the adopted-project metadata expectations. The test now imports the exported DoctorJsonCheck contract instead of maintaining an obsolete local five-field type. This fixes TS2769 from #840 shard 8; runtime assertions and product code are unchanged.

Root bun run typecheck passes both at the R7a fix and final stacked head (CLI uncached, DB cached). Final stacked head also passes all five adoption CLI cases /86 assertions; changed-file lint and privacy pass. Same persistent Opus reviewer clean for the fix and exact normal-merge propagation. Fresh exact-head hosted checks and Codex are pending; no Mac or merge claim.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 6e27a9a295

ℹ️ 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 Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6e27a9a295

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead: 6e27a9a2958b2fe29b16d7ab60f9339876c66cd6 (R7a).

All five planned Linux shards, test focus, required test fan-in, secret scan and docs site checks pass at this exact head (CI run 43586724892). Same persistent Opus reviewer and current-head Codex code review are clean. The exact-target scope finding is fixed, answered and resolved. computer pr review-status: CLEAR at 6e27a9a295, zero unresolved bot threads/change requests; base is next 5002cf8.

The audit now adds schema 1 inside {ok,data} plus per-check area/scope/fix metadata. Local root typecheck, relevant regression tests, lint/privacy and docs checks pass. Strict adopted-project expectations include the new fields and use the exported check type; existing assertions remain.

CLI macOS/Docker/native tiers are deferred by light CI; the green Docker fan-in does not mean Docker scenarios ran. The separate automatically triggered desktop macOS build is still queued. No manual Mac shard dispatch was made. No Mac runtime qualification or merge is claimed; lead owns the freeze and merge. Dependent PRs: #840 then #841.

@roodboi
roodboi merged commit 7881555 into next Nov 14, 2026
22 of 23 checks passed
@roodboi
roodboi deleted the codex/hack-2218-doctor-contract branch November 14, 2026 14:34
roodboi added a commit that referenced this pull request Nov 15, 2026
#840)

`hack doctor --fix --only 'hack gitignore' --yes --json --path <repo>`
repairs only Hack's managed ignore block, preserves user lines and
unrelated findings, then rechecks the file. The schema-1 `{ok,data}`
audit adds `data.fix: {id,changed,confirmed}` and exits 1 if
unconfirmed.

Only this closed safe ID is accepted. Missing consent, other IDs and
combinations with other repair modes refuse before discovery or
mutation. The repair uses the existing atomic/no-follow writer, rejects
adopted/non-Git projects and rechecks project selection before
publication. It never invokes broad guided remediation. Ordinary `--fix`
remains unchanged.

R7a metadata (#838) is merged. This PR now targets frozen `next`
8e7242d; its normal merge resolves the R7a squash/add-add and
documentation conflicts without altering the R7b patch (stable patch ID
matches the prior reviewed unit). Dependent R7c is #841.

Validation at merge head 2fed4e5: 49 focused tests /329 assertions
pass; root typecheck passes (CLI uncached, DB cached); changed-file
lint, privacy and docs checks pass. Rebuilt CLI passes all eight
relocated native-plan/config-import acceptance scripts with the prepared
compiler. Same persistent Opus reviewer clean; fresh exact-head CI/Codex
pending. Earlier consent/readback/idempotency and unsafe-input
regressions remain intact. No Mac qualification claim or manual Mac
dispatch.

HACK-2218 / R7b. The next.17 candidate is frozen; lead owns merging
after publication. The final ready note follows exact-head checks, with
no push after it.

---------

Co-authored-by: Kit <344842+roodboi@users.noreply.github.com>
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