Skip to content

feat(doctor): observe machine checks without project discovery (HACK-2218 R7c) - #841

Open
roodboi wants to merge 16 commits into
nextfrom
codex/hack-2218-doctor-machine
Open

roodboi wants to merge 16 commits into
nextfrom
codex/hack-2218-doctor-machine

Conversation

@roodboi

@roodboi roodboi commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

hack doctor --machine --json observes only machine state for the selected backend, even inside a checkout with invalid project inputs. It skips project discovery, project checks and retained gateway probes that scan registered configurations, and inspects global stores only for secrets hygiene. Every row has machine scope; output stays {ok,data:{schema:1,checks,summary,counts}} with existing warning/error exit semantics.

Only --json may accompany --machine. Project selection, browser targets and mutation modes refuse before any tools run. Existing engine/service probes remain read-only: no Docker, hackd or VM startup or repair is added. Ordinary Doctor keeps its project and gateway checks.

Depends on #840 (R7b); R7a #838 is merged. Normal merge through #840 includes frozen next 8e7242d. R7c's patch against its parent is identical to its previously reviewed unit, including the gateway isolation correction.

Validation at merge head 451e5b6: 21 focused tests /266 assertions pass, including real source-CLI checks for both backends inside broken project inputs, populated-registry positive control and gateway exclusion, option refusals, adoption metadata, and targeted repair. CLI typecheck, lint/privacy, CLI-reference regeneration, docs and compiled build pass. Parent #840 also passed all eight relocated acceptance scripts. Same persistent Opus reviewer clean for both merges; fresh exact-head CI/Codex pending.

Linux only: no live Mac TLS/runtime qualification or manual Mac dispatch. The earlier optional desktop Mac log-stream failure was in unchanged app code; the frozen base now includes #839's desktop teardown change, whose imported behavior is outside this CLI review. No new Mac result is claimed. Lead owns the next.17 freeze and merging; final ready note follows exact-head checks with no push after it.

HACK-2218 / R7c.

@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 2:43pm 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-14T14:45:17.226996Z 451e5b6 Manual request
🔒 Security Review ✅ Completed 2026-11-14T14:47:43.789627Z 451e5b6 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.

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

CI cancellation diagnosis at unchanged head 2d4a389: run 43585257573 was cancelled before Change scope completed. The test fan-in log says change scope was cancelled; evidence is incomplete; compiler/model/test/lifetime/image/Docker jobs were cancelled before running. This does not report a Doctor assertion failure or provide passing evidence.

Replacement CI run https://github.com/hack-dance/hack/actions/runs/43585261484 is already queued for the exact same commit (PR workflow concurrency cancels earlier runs). No source change, new push or manual rerun was made. Awaiting the replacement run and current-head Codex.

@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: 2d4a3894d6

ℹ️ 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/commands/doctor.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: 2d4a3894d6

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

Gateway project-read finding fixed, answered and resolved at head 53e23d4. Same persistent Opus delta review clean; 39 focused tests /193 assertions and CLI typecheck, lint/privacy, docs, rebuilt executable pass. Exact-head hosted 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. Keep it up!

Reviewed commit: 53e23d47ac

ℹ️ 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: 53e23d47ac

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 084958b83ba174e31f7b7e00b3a901cba7bb861b 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. Can't wait for the next one!

Reviewed commit: 084958b83b

ℹ️ 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: 084958b83b

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 595023ab5a3a21bd0f36567d1c44875ffee91cc8 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. 🚀

Reviewed commit: 595023ab5a

ℹ️ 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: 595023ab5a

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: 595023ab5a3a21bd0f36567d1c44875ffee91cc8 (R7c; CLI qualification complete, separate optional desktop failure below).

All five planned Linux CLI shards, focus, required test fan-in, secret scan and docs site pass at this exact head (run 43586725031). Same persistent Opus and current-head Codex code reviews are clean. Gateway project-read finding fixed, answered and resolved. computer pr review-status: CLEAR at 595023ab5a, zero unresolved bot threads/change requests. Dependency order remains #838 → #840 → #841.

The automatically triggered, separate Desktop app macOS job failed: https://github.com/hack-dance/hack/actions/runs/43586725012/job/132422732037 . Its Rust core suite reports 71 passed /1 failed: runner::tests::log_stream_parses_ndjson_and_stops_on_drop, core/src/runner.rs:909, t.elapsed() < Duration::from_secs(5), with the suite taking about 30 s. This fixture runs a fake shell CLI that prints NDJSON then sleeps 30 s; it never invokes Doctor. The desktop runner/test code is identical to next; this PR touches only DESIGN.md under apps/desktop. The workflow explicitly identifies itself as an unsupported-preview, nonrequired check. This is not a macOS pass or a diagnosed flake, and no desktop fix or rerun was made within this CLI unit.

CLI Mac/Docker/native tiers are deferred by light CI; green Docker fan-in does not claim Docker scenarios ran. No manual Mac dispatch or merge performed. Lead owns qualification/merge and the freeze.

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Updated candidate: 451e5b60fdd60602c7a500279059641f5f97a67e includes frozen next 8e7242db9466fe14f52b9bfb4513c02fa9d68bf4 by normal merge. The R7b and R7c unit patch IDs match their prior reviewed diffs exactly; same persistent Opus reviewer clean. Local verification and exact scope are updated in the PR description. New exact-head CI/Codex pending. No merge, manual Mac dispatch or ready-for-lead declaration yet; after the final ready note, this head will stay fixed.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 451e5b60fd

ℹ️ 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: 451e5b60fd

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 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>
Base automatically changed from codex/hack-2218-doctor-safe-fix to next November 15, 2026 02:15

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant