Skip to content

fix(contract): align command working directories with published schemas (#15860) - #15905

Merged
EffortlessSteven merged 2 commits into
mainfrom
fix/15860-command-working-directory
Nov 21, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
fix/15860-command-working-directory

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

The command validator admitted working directories that disagreed with the published rerun and repair-assurance schemas. It now rejects ECMAScript line terminators and a nonempty scheme prefix before the first separator.

Swarm / Source Boundary

  • ordinary swarm development PR

Source-of-truth Links

Governing issue or accepted claim: Closes #15860. Release schema inventory: #3920.

Acceptance delta (one sentence): command validation and ledger deserialization enforce the published working-directory line and scheme rules.

Candidate Relationships

Candidate branch: fix/15860-command-working-directory.

Follows the published rerun schema in merged #15855.

Scope

The validation change applies to working_directory. Positive controls cover a leading literal colon, colons in later path segments and the independent expected-writes field.

Scope Classification

  • One public contract

Support-tier Impact

  • none

Policy Impact

  • none

Proof

  • All 507 native Windows ripr-contract library tests passed.

  • Isolated native mutation checks independently removed the scheme-prefix test and line-terminator test. The regression rejected each mutation and passed against the unmodified implementation.

  • ECMAScript RegExp evaluation of both actual published schemas passed nine valid/invalid cases per schema.

  • Rustfmt 1.95.0 passed on both touched files. The Windows cargo fmt invocation exceeded the process argument limit. Rustfmt then passed for all 455 unique Rust targets across the four workspace members, enumerated by locked offline Cargo metadata and batched by edition.

  • The ledger regression serializes and deserializes the real GapRecord, checks the invalid-field diagnosis, and passes a valid record through route_from_gap_records. The native Windows default-feature test build ended before execution when rustc failed a memory allocation. A Rust-only retry on this Windows host also exhausted LLVM memory before execution. Hosted Linux test run 44952113476 is bound to cb73979. Shard 4 passed all 7,986 executed tests, including the named ledger regression (0.013 s). Its JUnit artifact matched the service SHA-256. Two separate advisory shards received runner shutdown signals and exited 143. Full advisory partition coverage is incomplete.

Claim Boundary

The change covers the working-directory line terminators and colon placement reported in #15860. Existing independent root-containment checks still apply.

Rollback

Revert this commit to restore the prior producer validation.

Spec-Test-Code Traceability

  • Contracts: schemas/ripr/rerun.schema.json and schemas/ripr/repair-assurance.schema.json.

  • Producer and contract test: crates/ripr-contract/src/domain/command_spec.rs.

  • Consumer test: crates/ripr/src/cli/rerun.rs.

Static Language Check

No static verdict vocabulary changed.

CI Economics

Existing routed Rust qualification applies.

The traceability follow-up 2d50f3c changes only .ripr/traceability.toml. Both new tests are now mapped to their governing contracts. check-traceability passed and a TOML-to-Rust source check resolved all three spec/test entries. The native and hosted product test evidence above remains bound to cb73979, with identical product and test source at the follow-up.

Protected Linux regression results

Run 44954584525 admitted PR head 2d50f3c201d29e6667c86357d0e261fbb2e0fa02. Its checkout was GitHub’s test merge e7ebb22f648fb62676fd657cb0f3e6ad6ca142b0, with base parent caf728c9184f89ea9b5282056fbb7f46f72f0e1e and the admitted head as its second parent.

The digest-verified combined JUnit artifact contains 32,685 listed tests across two verified shards. There were zero missing, duplicated, or out-of-inventory tests. working_directory_matches_published_line_and_scheme_rules passed in 0.007 s and ledger_rerun_admits_only_schema_compatible_working_directories passed in 0.016 s. Both production source files match the PR head byte for byte.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 148 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: fd041dec-d059-476a-bfc3-4a02610c3e5b
Commits

Reviewing files that changed from the base of the PR and between 7cf9cd6 and 2d50f3c.

Files selected for processing: 4

  • .ripr/traceability.toml
  • changelog.d/15860-command-working-directory.md
  • crates/ripr-contract/src/domain/command_spec.rs
  • crates/ripr/src/cli/rerun.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Reviewed cb73979f6450afe8d4bc6b44a3b1c7a3dca71a89 against issue #15860.

I walked the published schemas and found two working_directory property patterns, in rerun and repair-assurance. Both have the same expression. In the producer, validate_working_directory first retains the existing root-relative and empty-field checks. Its additional predicate applies only to cwd. expected_writes still takes the shared path validator. A colon after the first character of the first segment is rejected. A leading literal colon and colons after a slash or backslash are accepted, subject to existing root rules. CR, LF, U+2028 and U+2029 are all covered.

At the ledger boundary, deserialize_command_spec_collection runs CommandSpec::validate before accepting the typed collection. The test exercises that deserializer on values serialized from the real GapRecord and passes the valid record to route_from_gap_records. It checks the negative diagnostic and the positive cwd. The two independent native mutation controls each triggered the regression. The exact source checks, outstanding local build and hosted integration evidence are tracked in the PR body.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY

Reviewed cb73979. Both published working_directory patterns and the production validator agree on line terminators and the first-segment colon rule. The ledger deserializer rejects the invalid field before route construction and preserves an admitted later-segment colon. Both independent mutation controls were detected, all 507 contract tests passed, and Linux shard 4 ran the ledger regression successfully. Source inspection · Exact-head JUnit

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 21, 2026 21:55
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread crates/ripr/src/cli/rerun.rs Resolved

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY

Reviewed 2d50f3c. The only change since the prior reviewed head is three traceability entries. I inspected both spec contracts, verified the test functions and ran the traceability check. The underlying validator, ledger deserializer, test stimuli and expected outcomes are byte-identical to the passing contract and ledger proofs. Review finding and correction · Ledger JUnit

EffortlessSteven pushed a commit that referenced this pull request Nov 21, 2026
…discrepancy in the pending rows

Review on #15906: #15576 and #15578 are fixed by #15684, #15606 is partly
landed (#15656) with #15920 open, and #15860 with its repair #15905 is a
schema prerequisite under #3920 without the release-check label.

Refs #2766

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmvYqCdwBcBFx9a2bC

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW_READY

I rechecked the working-directory validator, its ledger consumer, and the traceability-only follow-up at 2d50f3c. Root-relative path validation remains shared; the line-terminator and scheme exclusions apply to cwd. Both negative mutations were detected locally. The single traceability finding is resolved. Verified PR qualification 44954584525, required Result 137013617864, and the 32,685-test partition bound to test merge e7ebb22. Both new regressions passed and the two production blobs match H. Final published-head judgment permits native enqueue. The queue must qualify its own composition.

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit aaf5155 Nov 21, 2026
19 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/15860-command-working-directory branch November 21, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CommandSpec working_directory: producer validator admits values the published pattern rejects

1 participant