Repository navigation
fix(cli)!: standardize HACK-2218 machine output contracts - #835
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47aee20e1c
ℹ️ 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".
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
…ontract # Conflicts: # scripts/check-native-acquisition-plan-cli.ts # scripts/check-native-endpoint-plan-cli.ts # scripts/check-native-env-plan-cli.ts # scripts/check-native-host-plan-cli.ts # scripts/check-native-process-plan-cli.ts # scripts/check-native-routing-plan-cli.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82de876997
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Ready for lead: 2058a97 Normal merge of Merge resolutions:
Follow-up 2058a97: Unpublished outputs that do not follow the HACK-2238 envelope rule (not changed in this PR; recommended follow-up: give each a string schema id inside the envelope):
Ran locally on the merged head (Linux, Bun 1.4.4, temp HOME, Exact-head hosted CI (run 43668277536): every Linux job passed: test shards 3–8, all 4 Docker e2e shards and fan-in, linux-process-lifetime, Candidate core (ubuntu), Config compiler (ubuntu x64 and arm), Desktop app (Linux), runtime state models and images, docs site, secret scan. Already passed on macOS: Candidate core, Config compiler, Desktop app. macOS test shards 1/8 and 2/8: queued, not waited for. Optional Proof skipped. GitHub reports mergeable. Review: persistent Codex reviewer (gpt-6.1-sol, codex-dio) CLEAN on the merge and the follow-up (round 4). Codex bot: no major issues and no security issues at 2058a97. Still open for the lead: the Mac batch, and the Mac app's read-only state tool against real local state. Desktop strict version parsing needs the new CLI contract; released CLIs do not provide it. No further pushes planned after this note. #831 is merged on top of this head. |
Build the fixture's failed, unregistered up record with the production activity writer so it carries exactly the schema's nine keys and no path. It passes with the current shared helper and with the stricter key-set check proposed in #835, so merge order does not matter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…migration `env migrate --json` (#797) is an envelope without `data.schema`; `usage --json --by-service` (#852) is a schema-tagged variant, so its schema id moves into MACHINE_SCHEMAS. Flag variants whose base command keeps another shape now get their own reference row instead of a hard-coded list. The outputs this branch migrates first shipped in 5.0.0-next.17, so the reference page no longer calls them unpublished and the next.18 release notes describe the change for scripts. BREAKING CHANGE: version, activity, projects --observe, global status --observe and global install|trust --plan JSON move into the {ok,data:{schema}} / {ok:false,error} envelope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…74aaf) into feat/hack-2218-project-state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Ready for lead: db01be6 Normal merge of Decision flagged: this PR is now breaking. 5.0.0-next.17 was published from e47681e, which does not contain this PR, so Inventory check against every
Outputs on
Ran locally on 4e55382 (db01be6 adds only a comment fix), Linux, Bun 1.4.4, temp HOME, Exact-head hosted CI (run 43684164738): 27 checks passed, including every Linux job (test shards 4–8, all 4 Docker e2e shards and fan-in, linux-process-lifetime, Candidate core and Config compiler on ubuntu x64/arm, Desktop app Linux, runtime models/images, docs, secret scan) and, on macOS, Candidate core, Config compiler and Desktop app. macOS test shards 1/8, 2/8, 3/8: queued, not waited for. Optional Proof skipped. GitHub reports mergeable. Review: persistent Codex reviewer CLEAN at this head (rounds 5–6 covered the merge, the Still open: the Mac batch and the Mac app's read-only state tool against real local state. No further pushes planned after this note. #831 is merged on top of this head. |
…on (#831) HACK-2218 R2: full and summary CLI project rows and hackd /v1/projects share backend-aware state, readiness/completion, health, exit code and start time. Native projects use authenticated observers; missing evidence stays unknown. Completed declared jobs do not degrade running peers; inactive absent profiles are excluded. Depends on #835, ready head 58605b6. Merge #835 first. Current next and that prerequisite are merged normally. Plain projects JSON keeps its published shape; observe listing uses the prerequisite schema envelope. Only R2's appendix row is edited. Default --json --observe makes no engine/provider contact and bypasses daemon/registration. --observe --runtime explicitly opts into runtime reads. Changed and terminated cached Docker IDs are re-inspected on event refreshes; unchanged running IDs stay query-free and omit fresh health/start evidence. Native concurrency is four. Inspect fields exclude env values, commands, error text and health logs.  Validation: 165 focused tests pass in separate isolated processes, including state/profile/health, native observations, runtime cache, full/summary projection, non-contact observe and machine-output contracts. CLI build, typecheck, root check/privacy, documentation checks and regenerated CLI reference pass. Exact-head persistent review and hosted CI pending. The prerequisite passed desktop core on Linux/macOS; R2 changes no desktop code. Live Docker probe: task-owned containers with and without health checks retain state and mounted-volume ownership; disposable-volume verification succeeds. The inspect template safely handles absent health keys. The cache-prune scenario explicitly disables its health check to guard that path; its full hosted rerun is pending. Limits: no live hackd, native provider or real Mac state-tool run locally. Compose-format projects follow the observing process backend selection, including hackd environment; Compose observations do not establish native state. Native timestamps remain null, and native rows describe the base instance. Lead owns Mac qualification and merge. --------- Co-authored-by: Kit <344842+roodboi@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…econcile Brings in next at 345dc0d, including the shared JSON envelope rule and command inventory (#835) and shared service state (#831). Conflict: only the generated plugins/hack/skills/hack-diagnose/references/error-codes.md (content revision line). Regenerated with bun run generate:agent-plugins: next's rows plus E_DAEMON_SERVICE. Adapted to #835: hack daemon start|stop|restart|install --json are recorded as schema-envelope in the JSON inventory, and their schemas are registered in MACHINE_SCHEMAS. The envelope was already #835's shape (exactly ok and data, schema inside data, E_DAEMON_SERVICE errors with detail), so only the schema id changes from hack.daemon-<command>/v1 to the registry's dotted form hack.daemon-<command>.v1. The post-update parser uses the same constant. Regenerated docs/reference/machine-readable-output.md; the CLI reference had no diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…autostart --json Follow the machine-readable output rule from #835 for these new commands: `hack autostart add|list|pause|remove|resume|run --json` now return `{ ok, data: { schema: "hack.autostart.v1", action, ... } }`; `list` no longer prints a bare object. The commands are added to the JSON inventory and the generated reference table. `projects --json` keeps its legacy shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # apps/desktop/core/src/source.rs
# Conflicts: # apps/desktop/core/src/runner.rs
…hape #835's success-shape test pins the legacy top-level keys of plain `projects --json`. This branch intentionally adds the machine-wide `autostart_global` object there (documented in always-on-projects), so add it to the pinned key set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update (Nov 15): breaking for next.17. 5.0.0-next.17 shipped from a tree without this PR, so
version --json,activity --json,projects --json --observe,global status --json --observeandglobal install|trust --plan --jsonare now published in their older shapes. This PR moves them into the envelope, so the title is marked!and the next.18 release notes describe the migration for scripts. The desktop core parser in this PR requires the new contract, so it cannot read a next.17 CLI'sversion --json. Since then the inventory also coversenv migrate --json(#797, envelope without a schema id) andusage --json --by-service(#852,hack.usage.by-service.v1).The unpublished HACK-2218 JSON commands used incompatible top-level shapes. Version, observe-only projects/global status, and administrator install/trust plans now return
{ok:true,data:{schema,...}}; Activity gains its missinghack.activity.v1schema. Failures return a stableE_*error envelope and nonzero status. Published plainprojects --jsonkeeps its existing shape. Refused and incomplete plans retain recovery evidence inerror.detail.plan.Desktop core consumes the version envelope and provides a strict schema parser for the migrated contracts. Shared generated fixtures test both CLI and desktop boundaries. The new Machine-readable output reference inventories every canonical JSON command, distinguishes legacy/streaming shapes, and is checked against the command definitions. The native-env-plan acceptance harness allows the lifecycle activity audit file while retaining its no-registry/no-runtime-state checks.
Validation: focused CLI/contract, administrator-plan, activity, observation, generation and reference tests pass; root typecheck/check/privacy, documentation checks and CLI build pass; desktop core has 79 passing tests. Contract tests check the shared usage-error boundary for all 80 canonical JSON commands and actual success boundaries for migrated variants and prune. macOS administrator tests are skipped on Linux. No live engine/native provider or Mac application state-tool validation is claimed; the lead will verify real Mac state. Desktop schema parsing requires the new CLI contract; released CLIs do not yet provide it.
HACK-2238. Based on
next; no app tab branches or desktop appendix rows changed.