Repository navigation
refactor(commands): adopt portable core navigation Shapes (FEAT-031) - #7009
aboimpinto wants to merge 13 commits into
Conversation
Match /init's existing WORKSPACE|PRESENTATION authority after 8867749. Approve only the already-declared pure sanitizer in the config normal graph; preserve all existing service rejection controls. FEAT-031 P0 baseline: 19066 nextest passed, 34 skipped; 3 doctests passed, 8 ignored; config proof 35 passed and 7 controls. Full Clippy, debug/release builds and format passed. No navigation implementation or product behavior change. Refs codewhale-hq#5316.
FEAT-031 P2 replaces hotbar/transcript/turn FunctionCommand App wrappers with shared pure handlers, real navigation inventory and exhaustive host action conversion. Preserve the original metadata, grammar, output and nine leaf assertions; core remains pending. Verified: 79 contract and 482 scoped native tests pass; 1125 actual observations across 15 locales plus all 40 metadata entries replay byte-identically. Full Clippy, rustfmt, 30 boundary and 63 migration controls pass. Complete 13-command portability proof remains P4; no physical move. Refs codewhale-hq#5316.
FEAT-031 P3 replaces the App-bound help/home/overview/links/anchor/workspace/translate wrappers and nine core.rs helpers with command-owned parsing/rendering, NAVIGATION bit30, narrow workspace/config operations and explicit host adapters. Retain all34 relocated host tests, old capability identities and confinement controls. No physical move or complete-core claim. Verified:79 contract and1289 commands/help/voice tests pass;1125 native observations across15 locales plus40 metadata entries remain byte-identical. Full Clippy, formatting,30 boundary/63 migration controls and locale guards pass; all failures/retries retained. Refs codewhale-hq#5316.
FEAT-031 P4 replaces the remaining voice App handlers with VOICE_INPUT bit31 Shapes, preserving u32 identities and exact authority. Relocate the unchanged capture runtime outside the movable group and retain builtin shortcut semantics. The real complete13-entry root compiles independently as an unpublished normal library; core remains pending for other slices. Verified:79 contract and1289 native command/help/voice tests;1125 observations/15 locales and40 metadata entries byte-identical;9 actual-source portable tests and7 rejection controls. Normal graph/build, full Clippy/fmt,30 boundary/63 migration controls, locales, developer routing and publication-order validation pass. No physical move or release. Refs codewhale-hq#5316.
FEAT-031 P5 extends existing host tests for user help precedence/alias shadowing, one-dismissal help behavior, home-directory routes and exact anchor read/open/partial-write/replacement failures. Production code and all original test identities remain unchanged. Verified:1289 commands/help/voice tests pass after correcting the fixture's comma-separated alias syntax;58 native/PTY acceptance tests pass against rebuilt current CLI. Contract79, navigation9+7 controls, config35+7, session65+5, boundary30/migration63 and locale/format checks pass. Numeric final coverage remains pending. Refs codewhale-hq#5316.
Hmbown
left a comment
There was a problem hiding this comment.
🤖 This review is from Claude Opus 5.5, an AI agent working on behalf of the Codewhale maintainers. It is posted through @Hmbown's account, but Hunter did not write it.
Thank you @aboimpinto for a careful, well-evidenced slice. The 1125-observation byte-identical replay and the 13-pair proof made it reviewable in depth. Each moved command was diffed against its old implementation on main, and the gate checks were re-run on a copy of the head (d22dfbb).
Verified good
- Behaviour is preserved for all 13 commands:
- registration order and aliases;
- usage and description keys;
- argument parsing and English messages;
- anchor bytes, with every write still through
fs_confinedand the.deepseekfallback; - workspace switching;
- voice and translate toggles.
- Every translated key passes the exact-placeholder check in all 15 locale files.
- Alt+V and the hotbar call the builtin voice handler directly, so a user command cannot shadow them, as you claimed.
- Bits 30 and 31 do not collide with anything.
Needed before merge
- The blocking-calls ratchet fails. The
candidate.canonicalize()site moved fromgroups/core/core.rstoWorkspaceAdapter::inspect_workspace_targetincommands/contract.rs, butscripts/check-blocking-calls-budget.jsonwas not updated. On the head,python3 scripts/check-blocking-calls-budget.pyprintscontract.rs: path_canonicalize sites 5 > budget 4and exits 1. Hosted Lint logs the same, but the step is advisory on PRs, so the check shows green. Onmainit blocks. The fix is net zero:python3 scripts/check-blocking-calls-budget.py --updatemoves the budget (contract.rs 4→5, core.rs removed). Maintainer edits are enabled on this PR, so I can push that one-file change to your branch if you prefer. Just say so. /linkslost its exhaustive locale match.public_site_locale_segmentmatched everyLocalevariant, so adding a locale caused a compile error. Inlinks.rsit now matches tag strings with_ => "en". Output is identical today. Butdocs/LOCALIZATION.md:199-203anddocs/zh_hans/LOCALIZATION.mdstill say the compiler will point at that function incore.rs. Either keep an exhaustive match, for example by mappingLocaleto a portable enum in the adapter, or update both docs.
Worth a look
3. CommandWorkspaceContext (WORKSPACE) gained anchor read/append/replace, a workspace-target probe and home-dir resolution. So /memory, /note, /task, /attach, /init and /plugins now carry anchor-write authority through WORKSPACE. They are first-party handlers, so this is not exploitable. But WORKSPACE was described as path reads (handler.rs), and NAVIGATION or a narrow anchor trait would keep it least-authority.
4. scripts/dev-test.sh now routes edits to the navigation leaves to codewhale-portable-core-navigation. That package has few of the relocated host tests, so a local dev-test on those paths stops running them.
5. The new proof can fail later PRs when main moves. It pins the total core registration count, absolute positions and the exact third-party dependency set, and it runs only on pull_request. When main changes any of those, unrelated PRs fail Test (ubuntu-latest), as happened with the config proof (fixed in 5fe4df9). Checking the 13 pairs' relative order instead of absolute positions would avoid that. The maintainers are also happy to own this follow-up.
6. Nits:
NAVIGATION/VOICE_INPUTuse up the u32 capability space, so a doc comment or a note on what comes next would help.- "all13" and "other27" in the README need spaces.
- The commits have no
Signed-off-by(the DCO check is advisory).
The macOS and Windows test jobs were still running when this review was written. Maintainers will add your CHANGELOG credit at merge.
— Written by Claude Opus 5.5 (AI agent) on behalf of the maintainers.
…flict main moved after this PR was opened; the only conflict was the generated web/data/agent-docs.generated.json. It was regenerated on the merged tree with node web/scripts/derive-facts.mjs; node web/scripts/check-facts.mjs prints OK on the result. No source file was hand-edited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBKbhx19BRbZtvWK8rVKjz
|
🤖 This reply is from Claude Opus 5.5, an AI agent working on behalf of the Codewhale maintainers. It is posted through @Hmbown's account, but Hunter did not write it. @aboimpinto, Items 1 (the blocking-calls budget) and 2 (the — Written by Claude Opus 5.5 (AI agent) on behalf of the maintainers. |
Relocate the existing canonicalization budget without increasing total authority or blocking-call allowance. Correct both localization guides, restore native command tests for command source paths, and make the complete navigation proof tolerate unrelated registry insertions while rejecting omitted/duplicate/reordered entries. Enforce source and normal graph checks on heavy main and PR lint jobs; retain explicit dependency review. Verified: 1215 native command tests (including all 34 relocated host tests), 9 portable tests, 7 proof controls, 34 blocking-budget controls, workflow regression, docs/facts and formatting pass. Preserved maintainer merge fc5ac7d. Workspace operation-level authority remains an explicitly documented follow-up; no capability renumbering or widening. Refs codewhale-hq#5316. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
|
Thank you for the detailed review and for resolving the generated-doc conflict. I fast-forwarded to your Pushed 6e73d36cb:
Item 3 remains a design follow-up: you are right that WORKSPACE consumers now have access to the confined anchor operations. The README and stale capability description now acknowledge that limitation; documentation does not narrow authority. A per-operation/anchor capability split needs a separate contract decision without silently widening or renumbering the agreed 32-bit representation. I am not marking that concern fixed. Also verified: 9 portable tests, 7 proof controls (including the new drift cases), workflow regression, formatting, and web facts/docs. New-head hosted CI is pending; earlier full-suite/coverage results are not presented as new-head receipts. Paulo Aboim Pinto |
Resolve the ci.yml conflict by retaining both portable navigation gates and upstream actions/setup-node@v7.1.0. All other upstream workflow content is structurally identical to main. Workflow regression (1 test), navigation proof controls (7 tests), strict blocking budget and web facts/docs pass. Full merged-input hosted CI remains pending. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
Hmbown
left a comment
There was a problem hiding this comment.
🤖 This review is from Claude Opus 5.5, an AI agent working on behalf of the Codewhale maintainers. It is posted through @Hmbown's account, but Hunter did not write it.
Thanks @aboimpinto. 6e73d36 answers the earlier review point by point. I re-checked it at 6cbdcb8:
- The blocking-calls budget now passes on its own merits (Lint: 539 sites, within budget).
- Both LOCALIZATION guides describe the tag mapping in
links.rs. Its output matches the old exhaustive match for all 15 locales. dev-test.shroutes command source paths back to the nativecommands::tests. Only the portable package andnavigation.rsroute specially.- The proof checks only the relative order of the 13 registrations, and the source and graph check also runs on main.
- CI is green on all three platforms: Ubuntu 19,075, macOS 19,078 and Windows 18,331 passed. The one leaky Windows test also leaks on main.
LGTM. Three nits, none blocking:
scripts/check-command-core-navigation-proof.pystill prints "all13" in its FAIL and PASS messages.- The Alt+V shortcut dispatches by index (
dispatch::<10>incore_navigation_voice_host.rs). A lookup byVOICE_INFO.namewould not depend on array order. - The WORKSPACE anchor-authority split stays open, and we'll track it on our side. It needs a capability-representation decision first, because bits 30 and 31 use up the
u32.
As planned, this merges after the 0.10.2 tag, with CI re-run on a fresh merge with main. We'll add your CHANGELOG credit at merge.
— Written by Claude Opus 5.5 (AI agent) on behalf of the maintainers.
…re-navigation-slice
Address the non-blocking PR codewhale-hq#7009 review nits: replace dispatch::<10> with builtin-registry lookup using VOICE_INFO.name, preserve capability-scoped dispatch and user-command shadowing isolation, and fix all 13 proof-message spacing. Verified 1215 native command tests, including existing shadowed-voice and pure action assertions plus safe missing-name rejection; 9 portable tests and 7 proof controls pass. Scoped TUI Clippy and formatting pass. No workspace authority redesign; maintainers own that follow-up and the post-v0.10.2 merge timing. Refs codewhale-hq#5316. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
|
Thank you for the approval and for tracking the WORKSPACE authority split on your side. Addressed the two small nits in 2152e4df6:
I preserved your latest Understood on the post-0.10.2-tag merge timing and fresh main/CI qualification. These focused results do not replace new-head hosted checks or the final merge gate. No capability-representation change was added. CI update: the new security run fails the Feishu and WeCom bridge audits. Both artifacts identify Paulo Aboim Pinto |
Resolve the two red npm-audit checks on PR codewhale-hq#7009 (GHSA-q3jh-wrc6-jgq8 and GHSA-8r9p-f939-6h3c). Update only the follow-redirects lock entries from 1.16.0 to 1.16.1; keep SDK versions, manifests and all other packages unchanged. No audit exclusions or threshold changes. Verified on Node 22.22.1: clean locked installs, syntax checks, Feishu 19/19 tests and WeCom 17/17 tests, zero vulnerabilities in both npm audit JSON reports, and installed dependency trees at 1.16.1. Original failing reports retained. Refs codewhale-hq#5316. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
|
The two red bridge audits are fixed in ccbc86312. Only the
This fixes GHSA-q3jh-wrc6-jgq8 and GHSA-8r9p-f939-6h3c without exclusions or a lower threshold. Other new-head checks and the agreed maintainer merge/release timing remain separate. The security repair is isolated in this lockfile-only commit for the shared baseline if useful. Subsequent check results: the same run now reports five other failures: Paulo Aboim Pinto |
…ip ci] Finish the inherited Claude shell-card changes: lead with the description, keep the actual command visible, preserve explicit non-success states at narrow widths, and keep full transcript/copy behavior. Update the existing widget assertions and accessibility/tool documentation. Refresh rustls-webpki/root certificates, MCP 2.3.1 and its pinned bundle/notices, Vite/rolldown, and bridge follow-redirects security fixes. The bridge upgrade also appears in @aboimpinto's PR #7009; that contributor PR remains open. Check host restart generation instead of assuming an OS never reuses a PID. Verification on macOS, Node 22.20.0: - npm test: 1,312 passed, 0 failed, 7 skipped; check:web passed. - TUI focused nextest: 1,585 passed, 2 failed of 1,587. Fixed the missing THIRD_PARTY_NOTICES version entries. The unchanged crash-reentry test hit its admission deadline during the parallel run. - Follow-up license, owner-bootstrap and terminal CLI checks, one test process at a time: 157/157 passed, including the original two failures. No timeout or production behavior was weakened to obtain this result. - Config catalog and daemon checks: 73/73 passed. - Telemetry: 174/174; Feishu: 19/19; WeCom: 17/17; type/syntax checks passed. - cargo audit: zero vulnerabilities; cargo deny passed all four checks. - npm audits: MCP, telemetry and both bridges have zero findings. Web's reviewed audit has no blocked findings, with nine existing mitigated braces-chain findings retained. - rustfmt, diff whitespace, extension bundle build and typecheck passed. The compiled source stayed unchanged during the native run. Only the missing notice document was corrected afterward. Windows behavior awaits the final release gate. CI is intentionally deferred under the founder's October 20 final-step-only instruction. No release tag, publication or deploy.
|
🤖 This reply is from Claude Opus 5.5, an AI agent working on behalf of the Codewhale maintainers. It is posted through @Hmbown's account, but Hunter did not write it. @aboimpinto, thank you for clearing the Feishu and WeCom audits in ccbc863. The checks still red at that head don't come from files this PR changes:
Nothing is needed from you before the 0.10.2 tag. Your branch still merges cleanly into today's |
Preserve main f9fd6a7, including TLS/Vite/MCP security fixes, host-generation restart assertion, and manual-only workflow policy. Keep the feature navigation checks; do not re-enable automatic CI. Integration validation found two inherited issues: collapse the fleet environment-host nested if for strict Clippy, and regenerate feature-registry hash/line references. No feature content or policy waiver added. Original failed receipts retained. Verified 1657 native commands/fleet/restart tests, 9 portable tests and 7 proof controls; web 772 tests plus 7 security controls, build/lint/types/facts/docs, workflow and boundary/migration/blocking guards pass. Rust audit: zero vulnerabilities, four unmaintained warnings retained. Four npm audits: zero vulnerabilities; web reviewed mitigation verified with no blocked findings. Hosted qualification remains manual; PR merge still waits for maintainer release timing. Refs codewhale-hq#5316. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
|
Kept the branch current in 8975885f0 by merging main This brings in the TLS/Vite/MCP fixes and the host-generation assertion replacing PID inequality. Integrated local verification passed 1,657 native command/fleet/restart tests, 9 portable tests, 7 proof controls, and 772 web tests plus 7 security controls. Scoped Clippy, web build/lint/types/facts/docs and relevant workflow/architecture guards also passed. The formerly failing restart test passed locally on Linux; I am not claiming a fresh Windows receipt. Two small inherited validation repairs are included and called out in the merge commit: collapse the nested fleet environment-host Rust audit now reports zero vulnerabilities (four unmaintained warnings retained); telemetry, extension-host and both bridge npm audits report zero vulnerabilities. The website's existing reviewed mitigation verifies with no blocked findings. I preserved main's manual-only workflow triggers, both navigation checks and all published history. No workflow was re-enabled or manually dispatched, and no PR merge/release was performed. Hosted qualification and final merge remain with the maintainers under the agreed release timing. Paulo Aboim Pinto |
Summary
Completes the 13-command core navigation slice behind portable command Shapes, in preparation for later crate extraction. No intended user-visible behavior change.
Commands:
/anchor,/help,/hotbar,/links,/transcript,/turn,/home,/overview,/workspace,/translate,/voice,/voicesend,/voicecontrol(all existing aliases retained).u32capability identities; use bits 30/31 for navigation/voice input. Unrelated commands do not gain these new facet slots. The existing WORKSPACE facet does now expose confined anchor operations to its consumers; per-operation authority narrowing remains an acknowledged design follow-up.tests/portable-core-navigation. Check all 13 registrations exactly once in relative order, complete source closure, all-target normal dependency graph and rejection controls. Integrate CI/developer routing and release-order validation.This is intentionally one coherent slice: the diff includes moved host tests/runtime and shared-contract consumer updates, rather than shipping parallel implementations. The other 27 core registrations remain out of scope, the
corefrontier remains pending, and no physical crate movement is claimed.Current main synchronization — 8975885 (2026-10-21)
Merged main
f9fd6a75ein 8975885f0, preserving all history and the post-0.10.2-tag PR merge condition. This brings in the Rust TLS/Vite/MCP fixes and the host-generation restart assertion.Local integration checks passed: 1,657 native command/fleet/restart tests, 9 portable tests, 7 proof controls, 772 web tests plus 7 dependency-security tests, scoped Clippy, formatting, web build/lint/types/facts/docs and relevant workflow/architecture guards. Two inherited validation repairs are explicit: collapse the fleet environment-host nested
iffor strict Clippy, and regenerate feature-registry hash/line references without changing feature content. Initial failures were retained.Rust audit: zero vulnerabilities, four unmaintained warnings retained. Four npm audits: zero vulnerabilities; website reviewed mitigation verified with zero blocked findings. These are local, scoped receipts—not a fresh full-workspace/Windows or numerical-coverage claim.
Upstream full CI is now manual-only. Preserved that workflow policy and both navigation checks; no workflow re-enabled/dispatched and no PR merge/release performed. Full hosted qualification remains pending. Integration details.
Earlier security repair — ccbc863 (2026-10-20)
Fixed the two red bridge audits with a narrow lockfile-only update:
follow-redirects1.16.0 → 1.16.1 in Feishu and WeCom. No SDK/manifests/other package changes and no audit exceptions. Clean locked installs, syntax checks, 19 Feishu tests and 17 WeCom tests passed; both local audits report zero vulnerabilities.Both hosted audits are now SUCCESS at ccbc863, with downloaded artifacts confirming zero vulnerabilities: Feishu, WeCom. Other new-head checks and maintainer merge timing remain separate. Repair details.
Earlier follow-up — 2152e4d (2026-10-20)
The maintainer-account review approved the prior implementation, with merge held until after the 0.10.2 tag and fresh main/CI qualification. The WORKSPACE authority split is explicitly tracked on the maintainers' side.
2152e4df6 fixes the two remaining small nits: proof-message spacing and builtin voice lookup by
VOICE_INFO.name, not array index. User-command overrides remain bypassed. Preserved the maintainer's latest49767fcebmerge; no published history was rewritten or force-pushed.Fresh integrated checks: 1,215 native command tests, 9 portable tests, 7 proof controls, formatting and scoped TUI Clippy passed. Existing assertions cover shadowed voice, pure named dispatch and missing-name failure. Compiled-host input refreshed. New-head CI is running; previous full-suite/coverage results below are historical, not new-head measurements. Reply.
Earlier review follow-up — 6e73d36
Preserved the maintainer's
fc5ac7d904merge, then addressed the two merge blockers and the developer-routing/proof-maintenance findings in 6e73d36cb. Point-by-point response.u32.Original preservation and verification (historical inputs below)
All 27 declared local final checks passed at the original recorded input. Native checks ran at
a0a9f2541; finald22dfbba9only refreshes stale generated documentation inherited from current main. All executable sources/manifests/test inputs are identical; affected web checks ran on the final generated bytes. The initial stale-doc failure was retained and repaired, not waived. Hosted CI and maintainer review remain separate evidence.Base:
5fe4df9c24c61ae4b4bd582bdda52fdbdeab8594.Head:
d22dfbba91863bedd85e4489b7f3369e4e3f9a7b.Portable proof:
Original hosted observation — 2026-10-17 (historical, not current head)
At head
d22dfbba9, CI run 39005160298 has passed Ubuntu tests (19,075 passed, 34 skipped), Rust lint, safety, MSRV and extension-host checks. Windows concluded success with 18,331 passed, 27 skipped, but nextest reported one leaky browser-launcher test (external_url_launcher_does_not_wait_for_browser_process); this is not a leak-free qualification. macOS native tests had not finished at that observation, so that receipt did not claim full hosted CI. Synthetic CI merge19c618de33162d1ac567a9ba7796610bb25f99dfis not an upstream delivery merge.Claude's fork-disabled comment is not a review approval. DCO is advisory and reports missing Signed-off-by warnings; no published history was rewritten. Skipped checks/deployment are not counted as executed passes.
Refs #5316. This PR implements only FEAT-031's bounded navigation adoption, not the umbrella decomposition. Required maintainer merge remains pending.
Paulo Aboim Pinto