Repository navigation
Tracking: assert stable codes instead of human sentences in CLI tests, and fold the covgap suites #1089
Description
[agent] Filed by the scheduled architecture audit routine (CLI and core). Register: discussion #560 register.
Kind: tracking. Source: Part 8.1; recommendations 8.5 G and H (register C32). Measured on main @ 05ecc6e.
Problem
CLI tests pin whole English sentences rather than behavior:
-
About 478 single-line
.contains("…")assertions incrates/socket-patch-cli/testsmatch a phrase of four or more words, across 114 files (the review counted 328 by a stricter rule). Multi-line assertions add to that. -
245 of them are in the 27
covgap_*/coverage_fix_*files: 26,086 lines and 391 tests. -
The heaviest files:
File Sentence assertions covgap_commands_scan_mod.rs46 covgap_commands_rollback.rs33 apply/covgap_commands_apply.rs30 covgap_commands_vendor.rs28 remove/covgap_commands_remove.rs27 covgap_commands_scan_hosted.rs21 covgap_commands_get.rs21 -
Many covgap tests come in
_json/_humantwins that drive the same code path twice. An example isremove_corrupt_vendor_ledger_fails_closed_jsonand…_human(covgap_commands_remove.rs#L332-L405). -
The repo has no snapshot tooling.
Impact:
- A copy edit touches dozens of test files. The output-polish PR Consolidated terminal UI and CLI-wide output polish #248 touched 65 files, and the shared remedy/UI-text work in Break command-module cycles and share remedy and UI text #1043 meets the same cost.
- Sentence assertions also hide whether the behavior (exit,
errorCode, events) is covered at all.
Target design
- Behavior is asserted through
--json:status,error.code/errorCode,events[].action/codeandsummarycounts, through shared helpers intests/common(assert_error_code(&out, "…"),event_codes(&out)). - Human output is asserted only in one render suite per command, keyed by message family. These use a few
instasnapshots if a maintainer accepts the dev-dependency, or exact-match fixtures otherwise. - Covgap twins collapse: where a
_jsontest covers a path, its_humantwin is deleted or reduced to the one render check that the render suite doesn't already have. - Covgap files are renamed into their command's suite once their tests assert behavior, so that "covgap" stops being a test category.
Children (one file family per PR, each deleting what it replaces)
- Child 1: Assert error codes instead of sentences in remove's covgap suite and add shared JSON assertion helpers #1090,
remove/covgap_commands_remove.rs, plus the sharedtests/commonassertion helpers. - Child 2:
covgap_commands_vendor.rsandrepair/covgap_commands_repair*.rs. - Child 3:
apply/covgap_commands_apply.rsand thecoverage_fix_*_silent_mute_exit.rspair. - Child 4:
covgap_commands_rollback.rs, after Decide: one shape for the--jsontop-levelerror(scan and get emit both a string and a {code, message} object) #704/Make every --json top-level error a {code, message} object (#704) #1027 givesrollback --jsona{code, message}error. - Child 5:
covgap_commands_scan_mod.rs,covgap_commands_scan_hosted.rsandcovgap_commands_get.rs, after Decide: one shape for the--jsontop-levelerror(scan and get emit both a string and a {code, message} object) #704 (bothscanandgetstill emit a bare-stringerror). - Child 6: the render suites (optional
insta) and the remaining non-covgap files (cli/output_modes_e2e.rs,cli/interactive_prompts_e2e.rs, …).
Acceptance criteria
- Every child keeps the covered production lines covered: the coverage job's line count for the touched command module doesn't drop.
- The count of 4+-word
.contains("…")assertions incrates/socket-patch-cli/testsfalls by every child's share, ending below 60, all of them in render suites. - No
covgap_*/coverage_fix_*file names remain.
Dependencies
- Children 4 and 5 are blocked by Decide: one shape for the
--jsontop-levelerror(scan and get emit both a string and a {code, message} object) #704 (Make every --json top-level error a {code, message} object (#704) #1027). - This is independent of C31 (test binary count, Tracking: build one RunCtx in main and stop mirroring CLI flags into the process environment #793), but the folded files reduce the binary count too.
Consolidated work — backlog review, 2026-10-08
The following standalone issues are now tracked here. Their closure consolidates scheduling; it does not mean their implementation is complete. Original reports and discussion remain linked below.
#1090: Assert error codes instead of sentences in remove's covgap suite and add shared JSON assertion helpers
- Track the remaining scope from Assert error codes instead of sentences in remove's covgap suite and add shared JSON assertion helpers #1090 in this issue. Explicit remove-test child of the stable-error-code test tracker; keep it as a checklist step.
Preserved scope and acceptance criteria from #1090
Proposed change
-
Add
tests/common/envelope.rswith:parse_envelope(stdout);assert_error_code(&Value, &str);event_codes(&Value) -> Vec<(action, code)>;event_purls(&Value, action).
Delete this file's private copies.
-
Rewrite each sentence assertion as the equivalent
--jsonassertion: the error code, event action/code, summary count, or the file bytes on disk. -
Delete each
_humantwin whose_jsonsibling covers the path. Where the human rendering is the point (the prompt text at L1854-L1862), keep one assertion per message family. -
Rename the file into the
removesuite (for exampleremove/remove_failure_paths.rs) when done.
Size and scope
- About −400/+250 test lines and no production change.
- Out of scope: other covgap files (later children of Tracking: assert stable codes instead of human sentences in CLI tests, and fold the covgap suites #1089) and any message wording change.
Acceptance criteria
- At most 3 sentence (4+-word)
.containsassertions remain in the file, each in a render-focused test. -
cargo test -p socket-patch-cli --test remove(or the renamed target) is green, as are the whole CLI tests. - Coverage of
commands/remove.rsis not lower than onmain(coverage job). -
tests/common/envelope.rsis used by this file and documented for the next children.
Activity
Remove suite asserts codes, not sentences
mikolalysenko commentedon Oct 14, 2026
[agent] Child 1 merged in #1535.
remove/covgap_commands_remove.rsis nowremove/remove_failure_paths.rsand reads its envelopes throughcommon::envelope, which gainsevent_purlsandhas_event. Its--jsontests now check codes, events and disk state instead of sentences: 4+-word.containschecks in the file went from 24 to 13, and 11 of the 13 are in human-mode render tests. The file's ≤3 target waits on child 6's render suite. Releasingagent:claimedso children 2 and 3 can be picked up.Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Claiming the repair slice of child 2 of this issue (
repair/covgap_commands_repair.rs,repair/covgap_commands_repair_vendor.rs,repair/coverage_fix_repair_vendor_predelete.rs; shared root cause: CLI tests pin English sentences instead of the --json codes).covgap_commands_vendor.rsstays for a later slice. Branch: agent/fix-ci-repair-envelope-asserts. Claim-ID: 2026-10-14T14:51:08Z-1f3f92Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Repair slice draft PR: #1539
Generated by Claude Code
Repair suite asserts codes, not sentences
mikolalysenko commentedon Oct 14, 2026
[agent] Repair slice of child 2 merged in #1539. The repair suite's covgap files are now
repair/repair_render.rs(human render checks),repair/repair_vendor_failure_paths.rsandrepair/repair_vendor_predelete.rs. They read envelopes throughcommon::envelopeand assert codes, events and disk state. The private-reader ratchet also catchesparse_env/events_of. Still open in child 2:covgap_commands_vendor.rs. Releasingagent:claimed.Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Claiming the vendor slice of child 2 of this issue (
covgap_commands_vendor.rsmoves ontocommon::envelopeand asserts codes, events and disk state instead of sentences; shared root cause: CLI tests pin English sentences instead of the --json codes). Branch: agent/fix-ci-vendor-envelope-asserts. Claim-ID: 2026-10-14T18:50:35Z-e06281Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Vendor slice draft PR: #1544
Generated by Claude Code
Vendor suite asserts codes, not sentences
Fix vendor suite review findings
mikolalysenko commentedon Oct 14, 2026
[agent] Claiming the apply slice of child 3 of this issue (
apply/covgap_commands_apply.rsandcoverage_fix_apply_silent_mute_exit.rsmove ontocommon::envelopeand assert codes, events and disk state instead of sentences; shared root cause: CLI tests pin English sentences instead of the --json codes).coverage_fix_vendor_silent_mute_exit.rswaits for #1544 so the two don't conflict. Branch: agent/fix-ci-apply-envelope-asserts. Claim-ID: 2026-10-14T19:50:59Z-6c1588Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Apply slice draft PR: #1546
Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Vendor slice of child 2 merged in #1544, which completes child 2.
covgap_commands_vendor.rsis now part of thevendorsuite binary asvendor/vendor_failure_paths.rs(--jsoncodes, events and disk state, with 0 sentence asserts of 4+ words),vendor/vendor_render.rs(human render checks, 25 sentence asserts) andvendor/npm_fixture.rs. The read-only-directory tests now skip under root.coverage_fix_vendor_silent_mute_exit.rsis left for child 3 with its apply twin. Releasingagent:claimed.Generated by Claude Code
Apply suite asserts codes, not sentences
Apply suite: review fixes for the split
mikolalysenko commentedon Oct 14, 2026
[agent] Apply slice of child 3 merged in #1546.
apply/covgap_commands_apply.rsis nowapply/apply_failure_paths.rs(--jsoncodes, events and disk state throughcommon::envelope, no 4+-word sentence asserts) andapply/apply_render.rs(18 human render checks), with shared fixtures inapply/apply_fixture.rs.coverage_fix_apply_silent_mute_exit.rsis nowapply/apply_silent_staging_errors.rs. Still open in child 3:coverage_fix_vendor_silent_mute_exit.rs, which waits for #1544.agent:claimedstays while #1544 is open.Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Claiming the last open piece of child 3 of this issue (
coverage_fix_vendor_silent_mute_exit.rsjoins thevendorsuite binary next to its apply twin, reads envelopes throughcommon::envelopeand the sharednpm_fixturerunner; shared root cause: CLI tests pin English sentences instead of the --json codes). #1544 has merged, so it no longer conflicts. Branch: agent/fix-ci-vendor-silent-staging-errors. Claim-ID: 2026-10-14T21:51:15Z-3c9e1aGenerated by Claude Code
Vendor silent staging tests join vendor suite
Pin vendor's real --silent error line
mikolalysenko commentedon Oct 14, 2026
[agent] Vendor silent slice PR: #1550 (ready). It moves
coverage_fix_vendor_silent_mute_exit.rsinto the vendor suite asvendor/vendor_silent_errors.rs, where it asserts thefailed/apply_failedevent and the per-patchError:line instead of free-form words. Once it merges, child 3 is complete.Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Claiming child 4 of this issue:
covgap_commands_rollback.rsandcoverage_fix_rollback_ecosystem_scoped_hosted.rsmove into therollbacksuite and assert--jsoncodes, events and disk state throughcommon::envelopeinstead of sentences. #704/#1027 have closed, so rollback's--jsonerror is now a{code, message}object and this child is unblocked. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-rollback-envelope-asserts. Claim-ID: 2026-10-14T22:50:45Z-36e383Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] Rollback slice draft PR (child 4): #1552
Generated by Claude Code
CI: rollback tests assert codes, not sentences
CI: address review of rollback test split
mikolalysenko commentedon Oct 14, 2026
[agent] Claiming the
getslice of child 5 of this issue.covgap_commands_get.rsmoves into thegetsuite binary and asserts--jsoncodes, events and disk state throughcommon::envelopeinstead of sentences.get --jsonalready emits a{code, message}error, so this slice isn't blocked.covgap_commands_scan_mod.rsandcovgap_commands_scan_hosted.rsstay open for later slices. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-get-envelope-asserts. Claim-ID: 2026-10-14T23:51:19Z-05be0aGenerated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent]
getslice draft PR (child 5): #1553Generated by Claude Code
mikolalysenko commentedon Oct 14, 2026
[agent] #1550 merged, so child 3 is complete.
coverage_fix_vendor_silent_mute_exit.rsnow lives in thevendorsuite binary asvendor/vendor_silent_errors.rs. Its--jsontest reads the envelope throughcommon::envelope(failed/apply_failedfor the patch purl), and its--silenttests require anError:line naming the patch rather than free-form words.dead_endpoint()is now shared invendor/npm_fixture.rs. Children 4–6 remain.Generated by Claude Code
CI: get tests assert codes, not sentences
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the
scan_hostedslice of child 5 of this issue.covgap_commands_scan_hosted.rsmoves into thescansuite binary and asserts--jsoncodes, events and disk state throughcommon::envelopeinstead of sentences.covgap_commands_scan_mod.rsstays open for a later slice. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-scan-hosted-envelope-asserts. Claim-ID: 2026-10-15T00:50:50Z-304ce8Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
scan_hostedslice draft PR (child 5): #1556Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Rollback slice (child 4) merged in #1552.
covgap_commands_rollback.rsis now part of therollbacksuite binary:rollback/rollback_failure_paths.rschecks--jsoncodes, events, warning codes and disk state, with 0 sentence asserts of 4+ words.rollback/rollback_render.rsholds 27 human render checks.rollback/rollback_fixture.rsholds the shared fixtures.coverage_fix_rollback_ecosystem_scoped_hosted.rsalso joined the same binary asrollback/rollback_ecosystem_scoped_hosted.rs.Still open: child 5 (
covgap_commands_scan_mod.rs,covgap_commands_scan_hosted.rs,covgap_commands_get.rs, now unblocked because #704 is closed) and child 6.agent:claimedstays while #1550 (vendor silent slice) is open.Generated by Claude Code
Assert codes in hosted scan tests, fold binary
Tighten hosted scan test checks after review
mikolalysenko commentedon Oct 15, 2026
[agent] #1556 (
scan_hostedslice of child 5) is ready for review.covgap_commands_scan_hosted.rsnow lives in thescansuite binary asscan/hosted_failure_paths.rs(26--jsontests, 0 sentence asserts, down from 20) andscan/hosted_render.rs(14 human-output tests, one check per message family), with shared helpers inscan/hosted_fixture.rs. With #1553 (get), onlycovgap_commands_scan_mod.rsremains in child 5.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
getslice of child 5 merged in #1553.covgap_commands_get.rsis now part of thegetsuite binary asget/get_failure_paths.rs(--jsoncodes, events and disk state throughcommon::envelope, with 0 sentence asserts of 4+ words),get/get_render.rs(human render checks, 18 sentence asserts) andget/get_fixture.rs.coverage_fix_get_double_json.rsis renamedget/get_single_json_document.rs. Still open in child 5:covgap_commands_scan_mod.rsandcovgap_commands_scan_hosted.rs.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the
scan_modslice of child 5 of this issue:covgap_commands_scan_mod.rsmoves into thescansuite binary and asserts--jsoncodes, events and disk state throughcommon::envelopeinstead of sentences, with human output kept in one render file. It is the last covgap file in child 5. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-scan-mod-envelope-asserts. Claim-ID: 2026-10-15T02:51:05Z-0bbbf3Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
scan_modslice draft PR (child 5): #1560Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] #1556 merged, so the
scan_hostedslice of child 5 is done.covgap_commands_scan_hosted.rsnow lives in thescansuite binary asscan/hosted_failure_paths.rs(--jsoncodes, no sentence asserts),scan/hosted_render.rs(one human-render check per message family) andscan/hosted_fixture.rs. With #1553 (get) merged too, onlycovgap_commands_scan_mod.rsremains in child 5.Generated by Claude Code
CI: scan mod tests assert codes, not sentences
mikolalysenko commentedon Oct 15, 2026
[agent] #1560 (
scan_modslice of child 5) is ready for review.covgap_commands_scan_mod.rsnow lives in thescansuite binary asscan/scan_failure_paths.rs(24--jsontests, 0 sentence asserts, down from 37),scan/scan_render.rs(35 human-output tests, one check per message family),scan/scan_tty.rs(4 PTY tests) andscan/scan_fixture.rs. Once it and #1556 merge, child 5 is complete. The covgap files left after that arecovgap_commands_vex.rsandcovgap_utils_socket_cli_config.rs.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the
vexslice of child 6 of this issue:covgap_commands_vex.rsandvex_terminal_output.rsmove into onevexsuite binary, with the--jsoncontracts asserting codes, events and disk state throughcommon::envelope, and human output kept in one render file. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-vex-envelope-asserts. Claim-ID: 2026-10-15T04:51:16Z-13a68cGenerated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
vexslice draft PR (child 6): #1563Generated by Claude Code
CI: fold vex tests into one suite on codes
mikolalysenko commentedon Oct 15, 2026
[agent] #1563 (
vexslice of child 6) is ready for review.covgap_commands_vex.rsandvex_terminal_output.rsnow live in onevexsuite binary:vex/vex_failure_paths.rs(9--jsoncontract tests, no sentence asserts),vex/vex_go_patches.rs(the go-patches guards, now read from--jsonskipped events),vex/vex_render.rs(15 human-output tests, one per message family) andvex/vex_fixture.rs. The top-level covgap files left after it and #1560 arecovgap_utils_socket_cli_config.rsandcoverage_fix_scan_hosted_dryrun_vendored.rs.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the
clislice of child 6 of this issue:cli/covgap_api_client.rs,cli/covgap_output.rsandcli/covgap_commands_list.rsget command-named files in theclisuite binary, the--jsontests assertwarnings[]/event codes throughcommon::envelopeinstead of sentences, and the human/PTY render checks keep one assertion per message family. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-cli-envelope-asserts. Claim-ID: 2026-10-15T05:51:07Z-e0dc58Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
clislice draft PR (child 6): #1565Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
scan_modslice of child 5 merged in #1560, which completes child 5 (with #1553getand #1556scan_hosted).covgap_commands_scan_mod.rsnow lives in thescansuite binary:scan/scan_failure_paths.rs:--jsoncodes, events, warning codes and disk state, with 0 sentence asserts of 4+ words.scan/scan_render.rs: the human render checks.scan/scan_tty.rs: the PTY tests.scan/scan_fixture.rs: shared fixtures.The covgap files left are
covgap_commands_vex.rsandcovgap_utils_socket_cli_config.rs.Generated by Claude Code
CI: cli suite tests assert codes, not sentences
CI: keep warn-once and remedy checks in --json
mikolalysenko commentedon Oct 15, 2026
[agent] #1565 (
clislice of child 6) is ready for review. The threecli/covgap_*files are nowcli/api_client_org_fallback.rs,cli/prompts_tty.rsandcli/list_render.rs. The--jsontests assert theapi_auth_fallbackcode throughcommon::envelope(new sharedoutput_envelope, which shows stderr on a parse failure), and the human/PTY tests keep one check per message family: 10 → 4 sentence asserts. Head 4c2517a is green on lean and full-scope CI, and Bugbot is clean. Remaining after #1560/#1563: theupdate/andscan/covgap files,covgap_utils_socket_cli_config.rsandcoverage_fix_scan_hosted_dryrun_vendored.rs.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the last two top-level covgap binaries of this issue:
covgap_utils_socket_cli_config.rsfolds intocli_config_fallback.rs(its harness was a copy of that suite's private helpers), andcoverage_fix_scan_hosted_dryrun_vendored.rsmoves into thescansuite binary asscan/hosted_dryrun_vendored.rs. Shared root cause: covgap files kept as standalone test binaries with cloned harnesses instead of living in their command's suite. Branch: agent/fix-ci-socket-cli-config-asserts. Claim-ID: 2026-10-15T06:51:47Z-7c3e1aGenerated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Draft PR for this slice: #1568
Generated by Claude Code
CI: fold last top-level covgap test binaries
Reuse scan suite helpers in hosted dry run tests
mikolalysenko commentedon Oct 15, 2026
[agent] #1568 is ready for review. It removes the last two top-level covgap binaries:
covgap_utils_socket_cli_config.rsfolds intocli_config_fallback.rs.coverage_fix_scan_hosted_dryrun_vendored.rsbecomesscan/hosted_dryrun_vendored.rsand uses the scan suite's shared helpers.Head 777911b is green (86 checks) and Bugbot is clean. Still to do: the
update/andscan/covgap files, plus the core crate'scovgap_*files.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the
update/slice of this issue:update/covgap_commands_update.rs,update/covgap_update_download.rsandupdate/covgap_update_swap.rsget command-named homes. The--jsontests assert codes, events and disk state throughcommon::envelope, and the human/PTY output keeps one check per message family inupdate/update_render.rs. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-update-envelope-asserts. Claim-ID: 2026-10-15T15:51:11Z-31a633Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
updateslice draft PR (child 6): #1580Generated by Claude Code
Update tests assert codes, not sentences
Tighten update JSON checks from review
mikolalysenko commentedon Oct 15, 2026
[agent] #1580 (
updateslice of child 6) is ready for review. The threeupdate/covgap_*files are nowupdate/update_json_contracts.rs(--jsoncodes, events, details and disk state throughcommon::envelope),update/update_render.rs(human and PTY wording, one check per message family) and adownload_failedtest inself_update_failures_e2e.rs. Head 9dd5b35 is green (86 checks) and Bugbot is clean. Still to do: thescan/covgap files (covgap_commands_scan_vendor_flow.rs,covgap_ecosystem_dispatch.rs,covgap_commands_fetch_stage.rs,coverage_fix_scan_discovery_corrupt_ledger.rs) and the core crate'scovgap_*files.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the
scan/slice of this issue:scan/covgap_commands_fetch_stage.rs,scan/covgap_commands_scan_vendor_flow.rs,scan/covgap_ecosystem_dispatch.rsandscan/coverage_fix_scan_discovery_corrupt_ledger.rsget command-named homes, with--jsonbehaviour asserted throughcommon::envelopeand human wording kept to one check per message family. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-scan-envelope-asserts. Claim-ID: 2026-10-15T16:50:49Z-a4ac23Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
updateslice of child 6 merged in #1580. The update suite has no covgap files left:update/update_json_contracts.rschecks--jsoncodes, events and disk state,update/update_render.rsholds the human and PTY wording, and thedownload_failedtest lives inself_update_failures_e2e.rs. Remaining covgap files:scan/covgap_commands_scan_vendor_flow.rs,scan/covgap_ecosystem_dispatch.rs,scan/covgap_commands_fetch_stage.rs,scan/coverage_fix_scan_discovery_corrupt_ledger.rs, and the core crate'scovgap_*files.Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent]
scanslice draft PR (child 6): #1583Generated by Claude Code
CI: fold review fixes into the apply staging tests
mikolalysenko commentedon Oct 15, 2026
[agent] Claiming the core-crate slice of this issue:
crates/socket-patch-core/tests/covgap_{api_blob_fetcher,crawlers_composer_crawler,crawlers_npm_crawler,patch_apply,update_state}.rsget named homes in their existing companion suites (sharing those suites' helpers instead of mirrored copies), which also drops four test binaries. Shared root cause: coverage-gap files kept as a test category with duplicated helpers. Branch: agent/fix-ci-core-covgap-homes. Claim-ID: 2026-10-15T17:51:03Z-c905e3Generated by Claude Code
mikolalysenko commentedon Oct 15, 2026
[agent] Core-crate slice draft PR (child 6): #1585
Generated by Claude Code
CI: core covgap tests join their suites
CI: share npm/composer test fixtures
mikolalysenko commentedon Oct 15, 2026
[agent] Core-crate slice of child 6 is ready in #1585: the five
crates/socket-patch-core/tests/covgap_*.rsfiles moved into their companion suites, which removes four test binaries. CI on 709b391 is green, including a full-scope Windows/macOS run, and Bugbot found no issues. After #1585 and #1583 merge, nocovgap_*orcoverage_fix_*file is left in the repo.Generated by Claude Code
mikolalysenko commentedon Oct 20, 2026
[agent] Re-verified on
origin/main@14eee88(CI/test lane).covgap_*orcoverage_fix_*file is left (CI: scan suite covgap files get real homes (#1089) #1583 and CI: core covgap tests join their suites (#1089) #1585 merged 10-15). Per-command render suites now exist (apply_render.rs,get_render.rs,rollback_render.rs,scan_render.rs,hosted_render.rs,vendor_render.rs,repair_render.rs). The shared envelope helpers live intests/common/envelope.rs..contains("…")assertions with a 4+-word phrase remain incrates/socket-patch-cli/tests. 108 are in*_render.rssuites, where they belong. Of the other ~204, 35 are in the silent/TTY/prompt/output-mode suites (cli_*_silent.rs,prompts_tty.rs,interactive_prompts_e2e.rs,output_modes_e2e.rs) and 44 are ine2e_*/docker_e2e_*. The rest are spread thinly, 1–11 per file across ~70 files. The largest areremove/remove_failure_paths.rs(11),redirect_npm_allow_remote.rs(8) andcli_gem_variant_mismatch_policy.rs(8).removehas noremove_render.rsyet.--silentdoesn't, and a prompt appears. Should those count as render suites for the "<60, all in render suites" target, or should their sentences move into per-command render suites? The answer changes the remaining target from ~200 assertions to ~165.No open PR holds the earlier
agent:claimed, so I'm releasing it. The next slice that fits isremove: addremove_render.rsand move the 21 sentences fromremove_failure_paths.rs,remove_duality_invariants.rsandcli_remove_silent.rsinto it.Generated by Claude Code
mikolalysenko commentedon Oct 20, 2026
[agent] Claiming the
removeslice of child 6 of this issue: addremove/remove_render.rsand move the human-wording checks out ofremove_failure_paths.rsandremove_duality_invariants.rsinto it, so the behaviour tests assert--jsoncodes, events and disk state throughcommon::envelope. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-remove-render-suite. Claim-ID: 2026-10-20T16:51:40Z-5e2a91Generated by Claude Code
mikolalysenko commentedon Oct 20, 2026
[agent]
removeslice draft PR (child 6): #1641Generated by Claude Code
Move remove's human-output checks to a render file
mikolalysenko commentedon Oct 20, 2026
[agent] Claiming the
applygem-variant slice of child 6:apply/cli_gem_variant_mismatch_policy.rsasserts 8 English sentences on human stderr. The behaviour tests move to--jsoncodes and events; the wording checks move toapply_render.rs. Separate files from #1641 (theremoveslice). Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-gem-variant-json-codes. Claim-ID: 2026-10-20T18:50:46Z-4f0b6dGenerated by Claude Code
mikolalysenko commentedon Oct 20, 2026
[agent] Draft PR for the
applygem-variant slice (child 6): #1642Generated by Claude Code
Check gem variant apply tests by JSON code
Share gem variant fixtures, tighten asserts
mikolalysenko commentedon Oct 22, 2026
[agent] #1641 merged the
removeslice of child 6. The human-mode and PTY wording checks now sit inremove/remove_render.rs, with shared fixtures inremove/remove_fixture.rs.remove_failure_paths.rschecks--jsoncodes, events and disk state; the only full sentence it still asserts is the "manifest was not modified" promise.Remaining
removefollow-ups:remove_cleanup_failures_warn_not_fatalstill asserts human-mode stderr. It should get a--jsontwin that pins the threecleanup_failedwarnings.cli_remove_silent.rskeeps its loud/silent sentence checks until someone answers the open question above: do silent/TTY suites count as render suites?No agent claim is held on this issue.
Generated by Claude Code
mikolalysenko commentedon Oct 22, 2026
[agent] Claiming the
removecleanup-warning follow-up of child 6:remove_cleanup_failures_warn_not_fatalchecks human stderr only. It moves to--json(threecleanup_failedwarnings, exit 0, manifest emptied) and its stderr wording check moves toremove/remove_render.rs. Shared root cause: CLI tests pin human output instead of the --json codes. Branch: agent/fix-ci-remove-cleanup-json. Claim-ID: 2026-10-22T17:51:19Z-4ffe39Generated by Claude Code
mikolalysenko commentedon Oct 22, 2026
[agent] Draft PR for the
removecleanup-warning follow-up: #1669Generated by Claude Code
Pin remove's cleanup warnings via --json
Check removed count, not store wording, in JSON
mikolalysenko commentedon Oct 22, 2026
[agent] The
applygem-variant slice of child 6 merged in #1642.cli_gem_variant_mismatch_policy.rsnow checks--jsoncodes and has no sentence assertions left (it had 8). The wording checks are inapply_render.rs. Follow-up for the product lane: in--json, a no-matching-variant miss exits 1 withpartialFailureandsummary.failed: 0, and no event names the base purl. Details are in the #1642 description.Generated by Claude Code
mikolalysenko commentedon Oct 22, 2026
[agent] #1669 merged the
removecleanup-warning follow-up.remove_cleanup_failures_warn_not_fatalnow asserts the--jsonenvelope: threecleanup_failedwarnings,summary.removed, theremovedevent and the manifest. The humanWarning: <store> cleanup failed:lines are checked inremove/remove_render.rs.Remaining
removefollow-up:cli_remove_silent.rskeeps its loud/silent sentence checks until the open question above is answered (do silent/TTY suites count as render suites?). No agent claim is held on this issue.Generated by Claude Code
mikolalysenko commentedon Oct 22, 2026
[agent] Claiming the
rollback_invariants.rsslice of child 6: its--jsontests already pinmanifest_not_found,patch_not_found,missing_blobandrollback_failed, but also assert the English messages on top (7 sentence checks), and its human-mode offline missing-blob test belongs inrollback/rollback_render.rs. Separate files from every open PR. Shared root cause: CLI tests pin English sentences instead of the --json codes. Branch: agent/fix-ci-rollback-invariants-codes. Claim-ID: 2026-10-22T21:51:02Z-394e96Generated by Claude Code
mikolalysenko commentedon Oct 22, 2026
[agent] Draft PR for the
rollback_invariants.rsslice (child 6): #1674Generated by Claude Code
Assert rollback codes, not sentences
Render rollback error lines and remedies
mikolalysenko commentedon Oct 23, 2026
[agent] #1674 merged the
rollback_invariants.rsslice of child 6. That file now asserts--jsoncodes (manifest_not_found,patch_not_found,missing_blob,rollback_failed) instead of English messages. Its 4+-word sentence checks went from 9 to 2.rollback/rollback_render.rsgained render checks for the no-manifest and unknown-identifierError:lines and for both missing-blob remedies (offline and online). The online remedy had no test before.Largest files left:
vendor/redirect_npm_allow_remote.rs(9),cli/output_modes_e2e.rs(9),cli/interactive_prompts_e2e.rs(9) andcli_remove_silent.rs(7). No agent claim is held on this issue.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] CI lane, 2026-10-23 22:5x UTC: looked at the four files the last comment lists as largest, and not claiming any of them.
cli_remove_silent.rs,cli/output_modes_e2e.rsandcli/interactive_prompts_e2e.rsare contract tests for human output itself (--silentmuting, output modes, prompts). Their sentence checks are mostly the "loud" baseline that proves a silent or JSON run actually dropped something. Under the target design these are the render checks that are meant to stay, so moving them to--jsoncodes would remove what they test.vendor/redirect_npm_allow_remote.rscould move to its event codes (redirect_npm_allow_remote,npm_allow_remote_left), but 9 checks in one hosted-npm suite isn't worth a PR plus a CI cycle on its own.I'd suggest a maintainer decide whether to close this tracker as done for practical purposes, with the human-output suites left as the render layer.
Generated by Claude Code
mikolalysenko commentedon Oct 25, 2026
[agent] Re-verified (CI lane, 2026-10-25,
origin/main@3db3cdf).covgap_*orcoverage_fix_*files remain undercrates/socket-patch-cli/tests(git ls-tree -r --name-only origin/main crates/socket-patch-cli/tests | grep -E 'covgap|coverage_fix'is empty). Children 1, 2, 3 and 5 landed as per-command*_render.rssuites (rollback_render.rs,vendor_render.rs,apply_render.rs,scan_render.rs,hosted_render.rs,get_render.rs,remove_render.rs,repair_render.rs)..contains("…")with 4+ words), there are 435 sentence assertions, down from 478. 161 of them are in render suites and 274 are outside them. The largest non-render files arevendor/redirect_npm_allow_remote.rs(11),cli/output_modes_e2e.rs(9),cli/interactive_prompts_e2e.rs(9),update/self_update_channels_e2e.rs(8) andcli_remove_silent.rs(8).redirect_npm_allow_remote.rs. It already asserts theEALLOWREMOTEwarning code. Its sentence checks tell apart the.npmrccreated, appended and already-set outcomes, and all three share one code and differ only indetail. Moving those checks to codes would need distinct warning codes or a structured field in the product first, which is outside a test-only slice. Thecli/*files are render tests by design (output modes, prompts). What's left is mostly child 6.Generated by Claude Code