CRW-547: wire crw pabcd review-round, metric and divergence verb rows - #562
Merged
Merged
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
crw pabcdcould not reach the three CLI libraries the earlier port issues added (review-round, metric, divergence). This wires them and claims the corpus fixtures those rows can drive.internal/harness/pabcd.go: three new rows in theVerbstable —review-round,metric,divergence— appended afterscan, one per line. The receipt row is untouched (a sibling branch edits it), so both merge as local hunks.internal/harness/pabcd_cli.go: three adapters reproducing the CXC v0.2.40 dispatcher branches exactly:review-round: parse refusals keep thereview-round:prefix on stderr with exit 1; a library error (the oracle's uncaught throw) answerscrw cli failed:exit 1; every result goes to stdout with its own code.metric: reads stdin only when the first argument after the verb is exactlyingest, and before resolving the working directory; overflow printsmetric: stdin exceeds 4194304 bytesto stderr and exits 1; otherwise the result goes to stdout with its code.divergence: a library error (the mode write) answerscrw cli failed:exit 1; every result goes to stdout with its code.contract/notes/cxc/CRW-547.json: claims the 22 cxc corpus fixtures these rows can drive, in the replayer's format.Expected behaviour and acceptance criteria
crw pabcdas three verb rows over the already-ported libraries, with the oracle's streams and exit codes (c1).Oracle sources ported
plugins/codexclaw/components/pabcd-state/src/cli.tsof CXC v0.2.40 (commit 3c1459acadeb1906d97c00a598e1457327ae372d): themetricbranch (lines 156-181), thedivergencebranch (183-189), thereview-roundbranch (310-330) and the sharedreadStdin/MAX_STDIN_BYTES(76-99), re-used through this repository's ownharness.ReadStdin. The ported libraries areinternal/pabcd/cli/metric.go,divergence.go,review_round_args.goandreview_round_run.go.Note on the criteria text: it speaks of a 64 KiB stdin cap; the oracle's bound is
MAX_STDIN_BYTES = 4 * 1024 * 1024(64 KiB is only the read chunk size). Parity follows the oracle: the adapter uses the existing 4 MiB bounded read and prints the interpolated bound in the overflow message.Commands and results
go test -count=1 ./internal/harness -run TestPabcdC6 -v— red first: 30 failing subtests, eachinvalid choice: "review-round"with exit 2; after the wiring the same command exits 0 with no failures.go test -count=1 ./internal/harness— exit 0 (whole package).go test -count=1 ./internal/contracttest -run 'TestDomain/cxc/(cli-help__(review-round|metric|divergence)__|cli__(divergence__mode_and_candidates|metric__record_show_kind_parse_line|review-round__show_and_open_refusals))' -v— exit 0, 22 PASS / 0 FAIL for the claimed fixtures.make lintexit 0;CGO_ENABLED=0 go build ./...exit 0;GOOS=darwin go vet ./internal/harness/...exit 0.go run -tags dev ./cmd/crw-dev ci pluginexit 0 with no digest change;ci validateexit 0;ci contractsexit 0 (40 title fixtures replayed; the cxc corpus agrees with its specs).git diff --checkclean; branch-history blob scan: no blob over 1 MB; pinned secret scan (gitleaks 8.30.1, the CI version): no leaks found.Corpus fixture classification
Entry point for every claimed fixture is its corpus
clistep mapped through the CLI name table tocrw pabcd <verb>and replayed byinternal/contracttest. 22 fixtures pass with this PR alone (19 help: 5 divergence + 8 metric + 6 review-round; 3 cli:cli__divergence__mode_and_candidates,cli__metric__record_show_kind_parse_line,cli__review-round__show_and_open_refusals), recorded asidenticalincontract/notes/cxc/CRW-547.json. Two review-round cli fixtures stay pending because they run theloopandorchestrateverbs, which have no row on this base:cli__review-round__open_signoff_and_binding_verdictandcli__review-round__unparsed_signoff_noted_and_abort. No fixture is claimed green that this PR cannot drive.Diff size
423 changed lines, 422 added and 1 deleted; generated data: none. Composition: implementation 76 (rows 3, adapters 71, the usage-line pin 1 add + 1 delete), tests 315 (the new
internal/harness/pabcd_c6_test.go), issue notes 32. Every file is far below 1 MB.Existing-test change (the only one)
One line in
internal/harness/pabcd_cli_test.go: the dispatcher--helpexpectation gains the three verb names, the row's own absence pin that a command-adding issue is allowed to update. Nothing else in existing tests, fixtures or goldens changes, and no file underplugins/crw/wiring/hooks,plugins/crw/skillsor any.codex-plugindirectory is touched.Defects
No new defect found in these three paths. The metric, divergence and review-round defects found while porting the libraries are already recorded in the port's defect record by the earlier issues, so this PR appends nothing there. One stale comment remains in
internal/pabcd/cli/metric.go("64 KiB bound" where the oracle bound is 4 MiB); it is a follow-up note only and outside this change.Head movement after the external reviews
Devin Review (no issues found) and the Codex Code Review (completed, no findings, thumbs-up) each ran once, on head
37c1c5cf. The final head274ad9b4badds one test-only commit: the threecrw_cli_failedassertions now also pin the trailing newline of the library-error stderr, closing a minor finding from this issue's own independent review. The implementation is unchanged, and CI is green again on the final head (run 37254720239, all ten jobs including dev-gate).Out of scope
The receipt row and receiptVerb (a sibling branch edits them), the
loopandorchestrateverb rows, library code, fixtures/goldens/existing tests beyond the single pin above, the activation surface, installation, release, merge, and any Linear write.