Skip to content

refactor(commands): complete session group shapes (FEAT-026) - #6793

Merged
Hmbown merged 12 commits into
codewhale-hq:mainfrom
aboimpinto:feat/FEAT-026-adopt-command-shapes-in-tui-session-structcopy-slice
Oct 1, 2026
Merged

Hmbown merged 12 commits into
codewhale-hq:mainfrom
aboimpinto:feat/FEAT-026-adopt-command-shapes-in-tui-session-structcopy-slice

Conversation

@aboimpinto

@aboimpinto aboimpinto commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Delivery state

GitHub records aboimpinto marking the PR ready and requesting Hmbown at 2026-09-30 10:00:53 UTC. The assistant did not perform either action and preserved the external change. Hosted CI still awaits administrator approval, and Devin skipped its full review because the trial expired with no credits remaining. Verification is incomplete.

Summary

Completes FEAT-026 and the full 17-command session group’s extraction boundary in place.

  • Move /structcopy behind its dedicated observation facet with exactly SESSION_STRUCTCOPY | PRESENTATION authority; concrete App, workflow, plan and clipboard access lives in the existing host adapter seam.
  • Use shared SessionCommandResult / SessionAction across the whole group; move concrete host registration and AppAction conversion outside it.
  • Move request/role shapes to protocol with compatibility re-exports from core. Move the existing pure sanitizer to codewhale-sanitize, preserving the secrets namespace for existing consumers without bringing credential storage into the command graph.
  • Compile the actual complete group root in a normal proof crate, and check its transitive dependencies. Remove session from both adoption-frontier projections.
  • Include the sanitizer in release order and developer tooling. Physical command-file relocation remains a later step.

Closes #6792
Refs #6145 and #5316.

Current-main reconciliation

Submitted head: 60235a471; executable source verified at 8c38b73f1. The final commit updates only the root and packaged changelogs; release checks pass on that final head.

Rebased onto 173edb8ae. Preserved upstream execution-ID correlation, refusal of ambiguous or inconsistent tool pairs, and the two upstream regression tests. Updated fixture assertions for that upstream behavior while retaining the original captured fixture bytes. Moved current-main request shapes and sanitizer implementations, including upstream fixes, rather than restoring older copies.

Acceptance evidence

Issue criterion Evidence
AC1: command surface Public-dispatch frozen observations, registry order/metadata and human-only assertions in session_structcopy_host_tests.rs.
AC2: exact authority and safe failure Contract capability tests, exhaustive host envelope assertion, and independent missing-facet tests.
AC3: complete extraction boundary sh scripts/check-portable-session.sh: actual 17-command group, normal library check, 64 passing tests; normal graph has command-contract/protocol/sanitize and ordinary utilities, without App/TUI, core/runtime, HTTP/DB or credential storage.
AC4: semantics, privacy and bounds Retained structcopy regressions and upstream tool-identity tests; portable redaction/caps assertions; real-host observation tests.
AC5: transports, locale and state Public workflow coverage across locales and clipboard outcomes; no-action/no-mutation checks, busy-plan/no-write and scoped workflow observations.
AC6: frontier and crate delivery Migration/boundary guards, sanitizer publication order and developer test routing.
AC7: revision-bound verification Local results and hosted checks tracked below. Hosted matrix and completed Devin Review are pending; verification remains incomplete until all applicable checks pass and actionable review findings are resolved.

Verification

  • Independent complete-group proof after rebase: 64 passed, 0 skipped, normal library check and graph guard pass.
  • Rebased workspace CI-profile nextest: 17,612 passed, 0 failed, 28 configured skips (three successful LEAK classifications); this includes the corrected transport fixture and both upstream execution-ID regressions.
  • Workspace all-target/all-feature Clippy under the CI allow list and formatting: PASS.
  • Doctests: 3 passed, 0 failed, 8 ignored. Boundary and migration guards, 91 guard tests, release-order inventory, release-note receipts and version/lockfile checks: PASS.
  • Preserved failed attempts: first selected session run had 200 pass/one outdated duplicate-ID fixture failure, then fixed; first full run had 17,611 pass/one typed-plugin failure with the system Node 22 build. That binary has no TypeScript stripping (process.features.typescript === false). The checksum-verified official Node 22.22.1 imports the same .mts file successfully; the focused test and subsequent full run pass without a product-code change.
  • Earlier completed-feature evidence before this rebase: 17,481 ordinary and instrumented workspace tests passed; 96.34% changed executable production-line coverage. These are historical results, not claims about this rebased head.
  • Hosted Linux/macOS/Windows matrix: blocked on administrator approval of fork workflows (CI run 36685514423; contributor approval endpoint returned HTTP 403).
  • Automated review: Devin Review, pending actual execution (user confirmed Greptile is unavailable and selected the other reviewer). Its green status says “Full review skipped: trial expired and no credits remaining”; no review findings/report have been posted. That skipped review does not satisfy this gate. GitHub now records an owner review request from the contributor account; the assistant did not send it. GitGuardian and contribution gate passed.

The local execution plan follows .github/workflows/ci.yml: hermetic HOME, nextest CI profile and separate doctests. Platform-only CI remains required. This refactor adds no new TUI behavior; current-main safety changes are preserved.

Paulo Aboim Pinto

Maintainer qualification (2026-09-30)

Regenerated web/lib/facts.generated.ts on the original contributor branch: the new codewhale-sanitize leaf makes 28 workspace crates. This repairs the hosted freshness failure; no command behavior was changed by this repair.

Fresh local verification on this tree: npm test passed 740/0 (68 npm wrapper, 16 runtime SDK, 54 extension host, 602 web); npm run check:web passed, including facts freshness, documentation, design tokens, lint, TypeScript and production build. git diff --check passed. Original contribution and ancestry remain preserved.

The production source review covers all 62 original changed files. This maintainer repair does not claim a new Rust build, native clipboard or provider acceptance. Fresh exact-head Linux/macOS/Windows hosted CI remains required before merge.

Paulo Aboim Pinto added 11 commits September 30, 2026 09:21
Capture 43 public-dispatch observations from unchanged upstream 6ce2d2e. Preserve exact JSON, locale and transport receipts, duplicate tool selection, busy-plan and workflow ownership behavior. A deliberately incorrect expected metadata value fails the normal comparison; restore the original fixture before validation.

Phase 2: 33 structcopy tests passed; formatting and discovery passed. Existing 32 test bodies unchanged. Refs codewhale-hq#6145.
Add independent bit-22 authority, typed transcript/tool/plan/workflow observations, path roots and native/queued clipboard receipts. Reuse CommandResult<Infallible>; preserve published bits and unrelated capability isolation. Keep the existing exhaustive host tests exhaustive when adding the optional slot.

Phase 3: 71 contract tests passed, boundary guard passed, formatting clean. Host adoption and rendering remain assigned to Phase 4. Refs codewhale-hq#6145.
FEAT-026 makes structcopy contextual. Include it in the existing migrated-command list while retaining the legacy-dispatch assertions for every other entry. The full instrumented suite and a focused rerun exposed the stale assertion; verification of this correction follows in the final gates.
Refs codewhale-hq#6145. Own session outcomes in the command contract and move host registration outside the group. Move actual request types to protocol and pure sanitization out of credential storage, retaining existing public imports. Compile the complete 17-command source closure and reject runtime dependencies. Portable tests: 64 passed; workspace Clippy passed. Final crosscutting gates pending.
Retain the failed session run as evidence. Update the two source guards that required the former secrets crate, and reject storage/runtime dependencies in the sanitizer manifest.
The release-order validator reproduced the missing crate after the sanitizer split. Publish sanitize before secrets and expose the existing developer test route for the new crate. Rust source and Cargo manifests are unchanged from the fully tested and instrumented revision.
Preserve upstream refusal of ambiguous tool identities while retaining the original golden capture. Use a unique tool pair for successful locale/transport cases and update stale payload ownership documentation.

Verification: workspace Clippy and formatting pass. Rebased portable group: 64 tests passed. Full workspace: 17611 passed, one extension-host failure due to the local Node build lacking TypeScript support; official Node comparison and CI-equivalent rerun in progress. Both upstream tool identity tests and the corrected transport matrix passed in that full run.
@aboimpinto
aboimpinto marked this pull request as ready for review September 30, 2026 10:00
@aboimpinto
aboimpinto requested a review from Hmbown as a code owner September 30, 2026 10:00
@aboimpinto
aboimpinto marked this pull request as draft September 30, 2026 11:22
PR codewhale-hq#6793 adds codewhale-sanitize to the workspace. Its hosted Web Frontend check rejected the committed facts file because it still listed 27 crates. Regenerate from the contributor's current 60235a4 tree; facts now list all 28 crates. Preserve the original contribution and branch ancestry.

Verification: npm test passed 740/0 (68 npm wrapper, 16 runtime SDK, 54 extension host, 602 web); npm run check:web passed, including facts freshness, docs, design tokens, lint, TypeScript and build. git diff --check passed. No new Rust build, native clipboard or hosted matrix acceptance claimed.
Signed-off-by: CodeWhale Bot <bot@codewhale.net>
@aboimpinto
aboimpinto marked this pull request as ready for review September 30, 2026 16:08
@Hmbown
Hmbown merged commit 10e75d1 into codewhale-hq:main Oct 1, 2026
29 checks passed
Hmbown added a commit that referenced this pull request Oct 1, 2026
#6793 moved path canonicalize into session_structcopy_host.rs without
moving the ratchet entry, so tip Lint failed on main. Follow the sync
host site with a budget receipt and tighten dead-code (258) plus two
cleared files.
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.

FEAT-026: finish session command shapes and extraction boundary

2 participants