Skip to content

fix(discovery): share structural package workspace markers - #8131

Merged
EffortlessSteven merged 2 commits into
mainfrom
fix/structural-workspace-markers
Oct 15, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
fix/structural-workspace-markers

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Harden package workspace recognition in shared CLI root discovery and TypeScript package-discovery evidence: accept top-level workspaces arrays/objects, including Yarn object forms; ignore string, number, Boolean and null values.
  • Document this as a deliberate narrowing of the former field-presence contract, not a claim that the old documentation required structural validation.
  • Add nested-root and real TypeScript evidence-consumer controls; retain package-root fallback, explicit roots and surrounding root-selection rules.

Closes #8126.

Swarm / Source Boundary

  • ordinary feature, analyzer, docs, spec, and test development for EffortlessMetrics/ripr-swarm
  • repair or follow-up for a same-repo swarm PR
  • swarm-only CI, runner, routing, source-of-truth, or agent-operating surface
  • other swarm-scoped work

No release, publishing, signing, release environment, or secret surface changes.

Source-of-truth Links

Proposal: bounded contract hardening in #8126.
Spec: RIPR-SPEC-0009, RIPR-SPEC-0085.
ADR: n/a.
Plan item: #8126.
Governing issue or accepted claim: #8126; historical #4553 / #4611 established non-Cargo workspace discovery.
Acceptance delta (one sentence): the two package-workspace consumers share array/object-only marker recognition while preserving existing traversal and fallback behavior, with matching documentation and bounded consumer controls.

Candidate Relationships

Candidate branch: fix/structural-workspace-markers.
Exact remote head: a4ba831aa150056f3d89e7f819f2cc14c2de3fe3.
Head tree: e7fcb4d71724ecaf73c353c36a54430317296144.
Candidate comparison base / merge base: 604ff1efcb7f4a34a570c6548862e50d392819d7 (tree 11f3f2dc28ba54b847342a0f04b7027380e364ad).
Intended base branch: main; observed main at preparation: 3496e1821b0e795403260a0c421483c0336ad25d (tree c68186c43a0d889a9fa137c9e82ada6b18956105).
Stack parent or prerequisite PR: none.
Proposed replacement of PR: none.
Acceptance retained from a replaced candidate: n/a. The issue records a retained CLI-only candidate; no predecessor PR is declared superseded.
Accepted winner and losing candidate disposition: not applicable.

Read-only checks at 2026-10-15 13:00–13:02 UTC found the expected remote head, no PR for the exact branch, and no exact structural-workspace-marker PR in bounded all-state searches. Issue #8126 remains open, names Harrier as coordinator, and has no comments or assignees. The issue's “no published branch” sentence predates the now-observed remote branch.

The candidate is two commits ahead and two behind observed main. Main's subsequent changes include TypeScript classification and advisory-review reporting; only .ripr/traceability.toml overlaps this candidate by filename. This is not a combined-tree test or mergeability claim and does not itself require restacking. Recheck current refs and claim ownership before publication. PR #7833's CLI check.rs delta is exit handling, not workspace-marker recognition.

Scope

Exactly 11 files in the candidate delta:

  • crates/ripr/src/config.rs: shared structural predicate.
  • crates/ripr/src/cli/commands/check.rs: CLI marker consumer.
  • crates/ripr/src/analysis/language/typescript/package.rs: TypeScript workspace consumer and field naming.
  • crates/ripr/tests/cli_smoke.rs: feature-gated test registration.
  • crates/ripr/tests/cli_smoke/structural_workspace_markers.rs: four integration test functions.
  • .ripr/traceability.toml: spec/test/code links.
  • docs/CONFIGURATION.md, docs/OUTPUT_SCHEMA.md: marker and evidence contract.
  • docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md, docs/specs/RIPR-SPEC-0085-typescript-evidence-adapter-contract.md: explicit contract narrowing.
  • changelog.d/8126-structural-workspace-markers.md: user-visible change.

Scope Classification

  • One public contract
  • One production behavior
  • One architectural seam
  • Docs/spec/test-only evidence package
  • Other

Production delta:

  • config::package_json_declares_workspace recognizes only array/object values at the top-level workspaces field.
  • Both existing consumers call this predicate after their existing JSON parsing. Existing read limits, error handling, nearest-package discovery and traversal remain at their existing owners.
  • TypeScript's internal fact/helper names now describe a declaration rather than mere field presence.

Evidence/support delta:

  • Five scalar values: null, false, true, number and string.
  • Seven container values: empty/nonempty arrays, Yarn packages/nohoist objects, empty object, and deliberately schema-invalid container contents.
  • Nested CLI root selection compared against an explicit-root control, with nonempty probes/findings and an explicit relative member-root check.
  • TypeScript evidence consumer exercised with an explicit outer analysis root so CLI root choice cannot conceal a different package-discovery decision; pnpm parent and package-root fallback controls.
  • Cargo workspace/package, uv, Git and unmarked current-directory controls. The unmarked fixture keeps its subject under src/ to satisfy unchanged source-role admission.

Single acceptance criterion:

  • Both consumers use the documented structural array/object marker boundary, reject scalar placeholders, and retain their existing surrounding root/fallback behavior.

Non-goals:

  • Full package-manager schema, member, or glob validation; package-manager execution; dependency changes.
  • Changing Cargo precedence, pnpm/uv recognition, Git boundaries, explicit-root authority or selected-root traversal limits.
  • New support tiers, runtime mutation results, native Windows qualification, hosted CI success, releases, or changes to PR fix(evidence): retain source file across colliding assertion lines #7833.

Support-tier Impact

  • none
  • updates docs/status/SUPPORT_TIERS.md
  • changes a docs, CLI, JSON, or package claim

Claim/proof notes:

  • Configuration and TypeScript evidence documentation explicitly narrows field presence to array/object recognition.
  • JSON field names/schema version and language support tiers are unchanged.

Policy Impact

  • none
  • doc artifacts
  • CI lane
  • package boundary
  • lint / Clippy
  • no-panic
  • file policy
  • generated artifact
  • dependency
  • process/network

Ledger or exception notes: no policy exceptions, workflow edits, dependencies or new production process/network surfaces. Existing test helpers invoke the CLI and Git.

Proof

Implementation-owner exact-head receipt: #8131 (comment) .

  • 11 focused tests passed.
  • 14 check-fast gates passed.
  • cargo xtask precommit passed.

Exact commands, feature sets, environment, binary identities, selector scope, baseline behavior and precommit digest are recorded in that receipt. These summaries are not independent execution evidence. No builds or tests were run during this read-only PR-body preparation; no individual gate below is marked passed from an aggregate summary.

Source inspection at the pinned head confirms four newly registered integration test functions:

  • scalar_workspaces_do_not_select_a_nested_cli_root
  • package_workspace_arrays_and_yarn_objects_keep_their_root
  • scalar_marker_preserves_cargo_uv_git_and_unmarked_root_boundaries
  • typescript_workspace_evidence_uses_structural_markers_and_package_fallback

The first three require lang-rust; the TypeScript evidence test requires lang-typescript. The eleven executed tests comprise these four functions (65 child checks), six implicit Git-root tests and one package-root test.

Independent exact-head semantic review completed with no actionable findings; 11 selected tests and 64 independent consumer checks passed, with baseline negative witnesses. See #8131 (comment) . Ready admission is for normal required CI, not merge clearance. No independent approval, malformed-JSON runtime, Windows execution, newer-main combined-tree execution, full-workspace pass or hosted required-check success is asserted. Owner baseline negative and existing Git/cache controls are recorded in the receipt. Existing JSON parsing remains fail-closed by source inspection; executable coverage must be described from its actual receipt.

Claim Boundary

May claim from the diff: both consumers share the structural predicate; arrays and objects include empty containers and schema-invalid contents by design; scalar placeholders do not establish a marker; corresponding contract documentation is updated.

Must not claim required hosted qualification passed, native Windows was exercised, all feature combinations passed, or every root-discovery entry point was executed. Independent semantic review and owner aggregate gate execution have separate receipts. This changes static workspace recognition, not runtime mutation outcomes.

Rollback

Revert the eventual squash commit through the normal repository process. This restores former field-presence behavior, its documentation, and associated tests/traceability together. No workflow, dependency, migration or protection change is needed.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0009 (CLI root contract), RIPR-SPEC-0085 (TypeScript evidence).
  • Tests: the four structural_workspace_markers integration tests listed above; existing TypeScript string-token test now uses the renamed helper.
  • Code: config::package_json_declares_workspace, check::non_cargo_workspace_marker, TypeScript parse_manifest_facts / json_declares_workspace / find_workspace_root.
  • Golden outputs: none changed.
  • Metrics: none claimed.
  • ADR/learning: field presence was the former documented rule; this is an explicit bounded hardening.
  • Traceability: .ripr/traceability.toml; changelog: changelog.d/8126-structural-workspace-markers.md.

Static Language Check

  • Static output introduces no runtime-outcome or sufficiency claim.
  • Unknown proof dimensions and their pending-receipt/review reasons are explicit.
  • Automated static-language gate result: pending detailed receipt.

CI Economics

n/a: ordinary product/docs/tests change; no CI behavior or lane-cost policy change.

  • LEM impact: none claimed.
  • Workflows touched: none.
  • Branch protection impact: none.
  • Failure mode caught: scalar placeholder choosing a workspace root in either consumer.
  • Cheaper signal considered: shared predicate inspection alone cannot establish consumer behavior; bounded real CLI/evidence controls are included.
  • Required lanes affected: none changed.
  • Advisory lanes affected: none changed.
  • On-demand/release lanes affected: none.
  • Labels that alter behavior: none requested here.
  • Artifact families affected: none.
  • Rollback path: normal squash revert.

Engineering Check

  • No new panic/unwrap/expect/todo/unimplemented calls in production code.
  • No new panic/unwrap/expect/todo/unimplemented calls in tests.
  • New non-Rust programming files: n/a.
  • New generated/dependency/production process/network surfaces: none.
  • Existing error behavior retained; tests include contextual failures.
  • Public evidence/root-selection semantics documented; JSON shape unchanged.

Gates

Detailed exact-head receipts are pending; unchecked does not mean a failure or a request to launch all commands. Release-only and extension commands are not required by this delta.

  • cargo fmt --check
  • cargo check --workspace --all-targets
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo doc --workspace --no-deps
  • cargo package -p ripr --list
  • cargo publish -p ripr --dry-run
  • cargo xtask check-static-language
  • cargo xtask check-doc-artifacts
  • cargo xtask check-support-tiers
  • cargo xtask check-no-panic-family
  • cargo xtask check-allow-attributes
  • cargo xtask check-local-context
  • cargo xtask check-file-policy
  • cargo xtask check-covered-by
  • cargo xtask check-executable-files
  • cargo xtask check-workflows
  • cargo xtask check-spec-format
  • cargo xtask check-spec-numbering
  • cargo xtask check-fixture-contracts
  • cargo xtask check-generated
  • cargo xtask check-badge-diff-policy
  • cargo xtask check-generated-clean
  • cargo xtask check-dependencies
  • cargo xtask check-process-policy
  • cargo xtask check-network-policy

Extension changes:

  • cd editors/vscode && npm ci
  • cd editors/vscode && npm run compile
  • cd editors/vscode && npm run package

Continuation

Owner / governing claim: Harrier / #8126.
Candidate: a4ba831aa150056f3d89e7f819f2cc14c2de3fe3, proposed Draft PR to main.
Review: substantive exact-head semantic review complete; no actionable findings. Required hosted qualification remains pending.
Validation: owner reports 11 focused tests, 14 check-fast gates and precommit; detailed receipt recorded in comment6192759811.
Dependency: no stack prerequisite.
Next: reconcile the exact-head execution receipt and independent review; refresh ownership/head/main checks before any publication, then follow normal published-head review and required qualification. This document alone is not Ready or merge evidence.

@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 Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d78c80dc-5ead-45a0-99a1-00ec01cf6f92
📥 Commits

Reviewing files that changed from the base of the PR and between 3496e18 and a4ba831.

📒 Files selected for processing: 11
  • .ripr/traceability.toml
  • changelog.d/8126-structural-workspace-markers.md
  • crates/ripr/src/analysis/language/typescript/package.rs
  • crates/ripr/src/cli/commands/check.rs
  • crates/ripr/src/config.rs
  • crates/ripr/tests/cli_smoke.rs
  • crates/ripr/tests/cli_smoke/structural_workspace_markers.rs
  • docs/CONFIGURATION.md
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md
  • docs/specs/RIPR-SPEC-0085-typescript-evidence-adapter-contract.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Summary by CodeRabbit

  • Bug Fixes
    • Workspace discovery now recognizes package.json workspace markers when the workspaces value is an array or object, including Yarn-style objects. Scalar values no longer cause a directory to be treated as a workspace. When no workspace root is found, TypeScript package discovery continues to use the package-root fallback.
  • Documentation
    • Updated configuration and output references to clarify workspace-marker recognition and fallback behavior.

Walkthrough

Workspace detection now treats top-level array and object workspaces values as package workspace markers. Scalar values do not qualify. CLI root selection and TypeScript package-discovery evidence use this rule, with tests and documentation updated.

Changes

Workspace marker detection

Layer / File(s) Summary
Structural marker detection
crates/ripr/src/config.rs, crates/ripr/src/analysis/language/typescript/package.rs, crates/ripr/src/cli/commands/check.rs
A shared predicate recognizes array and object workspaces values. TypeScript package discovery and CLI root selection use the structural marker.
CLI behavior tests
crates/ripr/tests/cli_smoke.rs, crates/ripr/tests/cli_smoke/structural_workspace_markers.rs, .ripr/traceability.toml
Smoke tests cover scalar and structural values, workspace-root selection, package-root fallback, and root boundaries. Traceability entries link the tests and predicate to their specifications.
Workspace marker contract
changelog.d/8126-structural-workspace-markers.md, docs/CONFIGURATION.md, docs/OUTPUT_SCHEMA.md, docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md, docs/specs/RIPR-SPEC-0085-typescript-evidence-adapter-contract.md
The changelog, guidance, output schema, and specifications describe accepted marker types and unchanged validation and fallback behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a4ba8

No actionable merge-blocking issue is identified; the change is ready for normal required checks.

Security architecture risk: 🔵 Low · up to a4ba8

This changes which project and cache are selected when a package contains a scalar workspace marker. Existing repository boundaries, explicit overrides, and guarded cache deletion limit the impact. No introduced security issue was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure is filesystem-local: repository-authored manifest values influence selected analysis/configuration scope, reported workspace evidence, and default cache targeting. Rejecting an inner scalar can include sibling packages under an enclosing root; it is not a guarantee of reduced analysis scope.

Security Findings and Attack Paths

  • inferred — No introduced privilege-escalation or boundary-bypass path was established. An actor able to edit the manifest could already make traversal continue by omitting the workspaces field. The PR removes scalar eligibility rather than granting that actor a new marker source or execution authority.

Trust Boundaries and Controls

  • observed — The existing CLI walk retains Cargo precedence and stops at verified or unverified Git boundaries. TypeScript retains its caller-supplied traversal stop and package-root ownership for verify-command inference. Successful implicit check runs retain disclosure when root rebinding skips a closer configuration file, including the explicit-root recovery option.

Resilience and Maintainability Implications

  • observed — Tracing persistent consumers found that init uses the resolved root for a warning, not to retarget configuration writes. Cache cleanup retains root/symlink checks, recognized-layer planning, force gating, and pre-delete verification. Partial multi-layer cleanup failure is existing disposable-cache behavior, not introduced atomicity loss.
Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 73.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (7 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue #8126 requires structural recognition in both consumers. config::package_json_declares_workspace accepts only top-level arrays and objects, including empty and Yarn-style object forms, and rej…
Out of Scope Changes check Passed The changed files support issue #8126. Production changes add one shared predicate and connect the two required consumers. Tests exercise scalar and structural markers, nested roots, fallback, and sur…
Title check Passed The title is concise, specific, and accurately summarizes the shared structural package workspace marker change.
Description check Passed The description is comprehensive and follows the repository template. It documents scope, source links, tests, proof boundaries, rollback, traceability, policy impact, and pending qualification clearl…
Full details: Docstring Coverage

Explanation

Docstring coverage is 73.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (7 skipped: 6 unsupported, 1 too large.)

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the package tree,
Arrays and objects count for me.
A scalar marker does not stay,
The tests trace roots along the way.
Then docs record the rule in ink,
And I hop off to nibble clover.

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member Author

Implementation execution receipt, head a4ba831aa150056f3d89e7f819f2cc14c2de3fe3, tree e7fcb4d71724ecaf73c353c36a54430317296144; base 604ff1efcb7f4a34a570c6548862e50d392819d7, tree 11f3f2dc28ba54b847342a0f04b7027380e364ad.

Eleven distinct tests were executed through three commands:

  • cargo test --locked -p ripr --test cli_smoke structural_workspace_markers:: -- --nocapture --test-threads=1: four passed, 525 filtered. These run 65 child checks across five scalar values, seven container forms, nested/explicit roots, Cargo/pnpm/uv/Git/unmarked boundaries and actual TypeScript workspace evidence/package fallback.
  • cargo test --locked -p ripr --test cli_smoke implicit_git_root:: -- --nocapture --test-threads=1: six passed, 523 filtered, including check/cache boundary controls.
  • cargo test --locked -p ripr --test cli_smoke check_from_a_package_source_dir_analyzes_the_crate_root -- --nocapture: one passed, 528 filtered.

Baseline production with the new structural tests: one passed, three failed at the intended CLI/Cargo/TypeScript false-root oracles. Negative loops stop at their first failure, so not all scalar negatives were executed. An initial unmarked Rust fixture was corrected from root-level lib.rs to src/lib.rs to respect unchanged source admission; failed receipts retained. Final paired frozen-binary replay of the same null-marker fixture with explicit outer root produced one finding on both revisions: base workspace evidence packages/member, candidate '.', unchanged package evidence packages/member.

Candidate check-fast passed 14 gates on the correct stable 11-file selector, including workspace/all-target Clippy; fixture contracts skipped there. Precommit passed, separately ran fixture contracts and all-target Clippy for ripr/xtask, with exact 11-record change set and no skips/limitations. Receipt SHA256 5fa2edb148e924d693e9a949a32761f81e251a090cda2fcd3f6475d9f85429c5.

Rust/Cargo 1.95 on Linux; default Rust/TypeScript/Python features, isolated target, incremental/debug info disabled. Focused builds used two jobs; gates one. Frozen CLI SHA256: base 0a555eebad720dea3cf2c751af6bc4ed566158814ba5d61fe5bbe5a713db0816, candidate 11998eacbf1ddb407e78597222ec6fdc1b6c97407aa257b3e1e237e5b6f172ce.

Independent review remains pending. Full runtime/doctest/nextest, full goldens/dogfood, alternate features, Windows/macOS, hosted CI and newer-main combined runtime remain unrun. Current-main source inspection is not a combined-tree test. No Ready or merge claim.

Copy link
Copy Markdown
Member Author

Independent substantive review and Ready-admission receipt for head a4ba831aa150056f3d89e7f819f2cc14c2de3fe3, tree e7fcb4d71724ecaf73c353c36a54430317296144, two-commit base 604ff1efcb7f4a34a570c6548862e50d392819d7, tree 11f3f2dc28ba54b847342a0f04b7027380e364ad. Immediate parent is 52605b727fd34ce69d529503913fc3b7e84b5f4a.

Reviewer: separate task 01a13fa5-fcb5-70d1-9788-5bd2ec66f015, turn 01a13fa6-07db-75bd-bd5a-b5ac7131addf. Semantic source/contract/oracle review completed with no actionable findings. Independently executed all 11 selected candidate tests and 64 additional consumer checks, including malformed JSON and extra Yarn/container forms. Exact-base tests compiled and produced three expected failures plus one passing structural control. Separate baseline matrix detected all five scalar forms across CLI, cache and TypeScript decisions (15 failing checks). Both executable witnesses and raw evidence retained.

Source composition against observed main a142074061128a85e76c1ac494b9939f3a58428b is clean, combined tree 421b44732b6a701995cf571e417ef0052fca4caa, preserving all three production owners. That combined tree was not compiled or executed. PR7833's exit-handling overlap is separate.

Owner local gate receipt is comment6192759811: exact-head check-fast and precommit passed. The reviewer did not independently replay those aggregate gates. Their REVIEW_INCOMPLETE label concerns overall merge readiness because hosted qualification remains pending; it does not conceal an unresolved semantic finding.

REVIEW_READY for normal required CI admission only. External review bots reported quota limits, not passes; no billing settings or external review retry was requested. Preserve required GitHub approvals and checks. Hosted actual checkout/outcome, native Windows, reduced-feature and full-suite qualifications are not established by these local receipts.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 15, 2026 13:12
@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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@github-actions github-actions 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.

Verification questions

  • Confirm no evidence receipt from cargo test --locked -p ripr --test cli_smoke is present in this packet; the ripr sensor failed and cargo-test is scheduled late. Opposition cannot independently confirm tests run; rely on central broker receipt before merge.
  • Confirm no positive control exists for a scalar placeholder inside a pnpm-anchored workspace at the member directory, comparing selected root against a non-pnpm control. Both pnpm-workspace.yaml and structural-marker branches may agree; a discriminant assertion (selected via pnpm only when member package.json is also structural) would tighten the proof.
  • Confirm config::package_json_declares_workspace is consumed from the typescript module but config.rs only re-exports items under pub(crate) use typescript::{...}; typescript-side reachability of the crate-root config module is not shown in the diff.
  • Confirm test structural_workspace_markers.rs::scalar_marker_preserves_cargo_uv_git_and_unmarked_root_boundaries covers scalar placeholders but never pairs them against non-scalar controls for cargo/uv/git/unmarked. Cargo/uv/git may select via their own markers regardless of package.json scalar, so this only proves the scalar does not mis-fire a PackageJsonWorkspaces root.
  • Confirm check_package_workspace_selection explicit member-root loop overwrites the diff fixture but never runs the same explicit-root assertion for SCALAR_MARKERS; only run for STRUCTURAL_MARKERS via package_workspace_arrays_and_yarn_objects_keep_their_root. SCALAR_MARKERS path does run explicit expected_root=repo + implicit, but no explicit member-root case there.

Refuted

  • Renaming json_has_workspaces_field to json_declares_workspace in typescript/package.rs and rerouting the body through the shared predicate could leak an interior Vec/String buffer if serde_json::Value was being shared across an async boundary.; refuted because: The renamed helper returns bool from a freshly-constructed Option. No async fn, no shared state, no interior-mutability cell. Both consumers re-parse per call, so no buffer can escape a stack frame.
  • The PR claims behavioral hardening but only changes names — same field-presence semantics preserved.; refuted because: Previous behavior was manifest.get("workspaces").is_some() (any value, including scalars) and object.contains_key("workspaces"). New predicate requires array/object; null, false, 42, "packages/*" previously matched but now do not. This is a real, documented narrowing, not a rename.
  • Active-view/resizable-buffer safety is at risk in this PR; refuted because: No Vec::resize, Vec::set_len, drain-with-overlapping-borrow, BytesMut split_to/split_off, TypedArray detach, ResizableBuffer/ArrayBuffer transfer, or arc/realloc path appears in any changed file. Predicate only inspects a serde_json::Value immediately after parse; no caching or aliasing across allocations.

Evidence gaps

  • Ripr sensor failed with exit code 2 but no receipt captured reasons; structural correctness rests on cross-functional inspection alone until cargo-test late phase lands.
  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • No spawn/send/Sync/closure-capture or Future is introduced; the rename and predicate handoff do not change Send/Sync bounds. The change is purely a marker-recognition narrowing with no concurrency footprint.
  • RIPR-SPEC-0085 evidence contract wording is consistent with the new CLI rule (arrays/objects mark; scalars don't), so no spec-level sibling is left describing the old field-presence behavior. Parked follow-up: any future validator that wants to check Yarn nohoist schema integrity should be a new helper, not a broadening of this predicate.

Copy link
Copy Markdown
Member Author

Disposition of verification review5533784557, independently checked on unchanged head a4ba831aa150056f3d89e7f819f2cc14c2de3fe3 by reviewer task 01a13fa5-fcb5-70d1-9788-5bd2ec66f015, turn 01a13fe7-8f68-76af-9330-e9109c4e277d:

  1. Missing receipts in that packet, ripr sensor exit2 and rejected model proof intent remain instrument limitations, not repaired passes. Separate retained owner/independent Cargo receipts establish 11 selected passing tests and baseline negatives; now-green required CI is additional, distinct evidence.
  2. pnpm precedence premise is reversed. Four new gitless actual CLI controls using a hash-verified retained exact-head binary passed, each with one probe/finding: null member + outer pnpm selects outer repository; null without pnpm uses cwd fallback; array member selects nearer member both with and without outer pnpm. Stderr confirms each selection reason.
  3. TypeScript reachability is established: config.rs defines the predicate directly as pub(crate); re-exports do not restrict it. package.rs calls it directly. The actual explicit-root TypeScript evidence test passes on head and fails on baseline field-presence behavior.
  4. Boundary pairing already includes an array marker below an outer Cargo workspace. Scalar controls challenge false marker admission. Requiring every scalar/container pair to select the same root would change existing precedence incorrectly.
  5. Scalar explicit member-root coverage exists: both scalar and structural loops call the same helper, which unconditionally runs --root .. and asserts root/probe/finding. All five scalar explicit-root controls executed in the retained passing test.

No actionable defect or source change. New pnpm control harness exited0 without rebuild. Failed sensors remain failed/unverified; no blanket evidence claim.

Final hosted qualification: run38740729968, gate116441587836 and aggregate116469531185 succeeded. Actual checkout 4651d5948f5e8a8c597a8eafe65d0ab3e5c81af4, parents 3496e1821b0e795403260a0c421483c0336ad25d + candidate, tree 07751eea758b296de63091c306f94c2336a43412. Nextest16,199 passed/three skipped, doctests two passed/one ignored, all subsequent required gates passed; advisory reports skipped, no native Windows claim.

Final independent source composition against main d4b67d2cd1bb3a1dfc138319bde7edd282dfef18 is clean, tree 3a5f38083de672d85f6857bd048a5a56ff91577e. All three marker production files and both sides' test/spec/traceability changes survive. That newer composition was not runtime-executed; existing receipts retain exact identities. Normal expected-head merge may proceed with required protections.

@EffortlessSteven
EffortlessSteven merged commit 8a55a5b into main Oct 15, 2026
38 of 39 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/structural-workspace-markers branch October 15, 2026 14:15
EffortlessSteven pushed a commit that referenced this pull request Oct 15, 2026
#8131's scalar_marker test writes a [tool.uv.workspace] marker, which a
binary built without lang-python refuses, so the Rust-only feature lane
is red on main since 8a55a5b. The uv case now runs only with
lang-python; the cargo, git and unmarked cases still run in both lanes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF96T8WMLipviRmdgetFpK
EffortlessSteven pushed a commit that referenced this pull request Oct 15, 2026
… of failing

The Rust-only feature lane is red on main since #8131: the uv case expects
a Python-marked root to analyse, but without `lang-python` the run refuses
by design. Assert that refusal (and the resolved uv root) there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV
EffortlessSteven pushed a commit that referenced this pull request Oct 15, 2026
`scalar_marker_preserves_cargo_uv_git_and_unmarked_root_boundaries` (#8131)
fails in the Rust-only feature lane on main: a binary built without
`lang-python` refuses a repo with a `[tool.uv.workspace]` marker instead of
resolving its root. Skip that one case without the feature; the cargo, git
and unmarked cases still run in every lane.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THmnTJYPr5V99aEDNdTy86
EffortlessSteven added a commit that referenced this pull request Oct 15, 2026
…er return (#6578) (#8102)

* fix(owner-pin): a verified expect_file golden comparison pins the owner return (#6578)

ExpectFile::assert_eq compares the actual text with the whole committed
file and panics on a mismatch, as the inline expect! comparison does.
Behind a manifest-verified `use expect_test::expect_file;` with a literal
path, it now pins the owner's return. The file is not read; the path
literal stands in for the fixed text, so only return-path gates that admit
any value accept it.

expect_file joins the test-scoped trusted macro names, so stored binding
candidates change (file facts 1.40) and classification changes (seam cache
1.76 / 0.82). Spec RIPR-SPEC-0197 gains the golden-file rules; SPEC-0231
decision 4 follows. Corpus row lib-expect-test-expect-file-golden moves
gap -> credited.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* test(owner-pin): control expect_file in owner bodies, renames and globs (#6578)

Review follow-up: an owner-side try-style expect_file! keeps the return
paths open; a renamed, cross-renamed or glob-imported expect_file never
pins.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* perf(owner-pin): compare the expect macro path without allocating (#6578)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* fix(owner-pin): a test that may write files lends no golden-file pin (#6578)

Review (Devin): a test can write the golden from the owner before
comparing, so the comparison fixes nothing. A test body that writes,
creates, copies or renames a file, or sets UPDATE_EXPECT, now lends no
expect_file pin. RIPR-SPEC-0197 golden-file rule 4.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* fix(owner-pin): golden paths stay in tree; renamed fs imports refuse (#6578)

Review (CodeRabbit): an absolute, home-relative or `..` golden path may
name text the commit does not fix, and `use std::fs::write as save;` hides
a write from the body scan. Both now lend no golden-file pin.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* fix(owner-pin): keep drive-letter literals out of committed text (#6578)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* test(fixtures): refresh first-useful-action digests for seam cache 1.77

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* fix(owner-pin): find renamed fs imports anywhere in a statement fragment (#6578)

Review (Graphite): the prefix match missed a `use` inside a module, after
an item or attribute, or with `pub(crate)`. Match on word tokens instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* fix(owner-pin): an escaped non-raw golden path refuses (#6578)

Review (CodeRabbit): `"\u{2e}\u{2e}/w.txt"` decodes to `../w.txt`, which the
source-text segment check cannot see. Any escape in a non-raw path literal
now lends no pin.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* test(owner-pin): use a cfg attribute in the rename-layout case

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* test(fixtures): refresh first-useful-action digests for seam cache 1.78

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* fix(owner-pin): commands, symlinks and qualified writers refuse a golden pin (#6578)

Review of record (soundness angle): `Command`, `symlink`, `persist`,
`<File>::create`, `fs_err::write` and `F::create` could produce the
golden unseen. The writer scan now refuses each, keeping `io::copy`
and method calls clear. Refresh the corpus case's hard_case text.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* test(owner-pin): spell the Command case so process policy reads it as text

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* fix(owner-pin): a turbofish writer call refuses a golden pin (#6578)

Review (CodeRabbit): `write::<_, _>("w.txt", ..)` under `use std::fs::write`
skipped the bare `write(` match.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

* test(discovery): a Rust-only build refuses the uv marker case instead of failing

The Rust-only feature lane is red on main since #8131: the uv case expects
a Python-marked root to analyse, but without `lang-python` the run refuses
by design. Assert that refusal (and the resolved uv root) there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vJe7tsVbzfQsHJiNujJgV

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Oct 15, 2026
…lue equality (#8114)

* Pin a payload-carrying early Err variant through whole-value equality

config-missing-equals-line (#7063 cluster 6) read weakly_exposed. The
error-variant sink dropped the payload, so no propagation witness
completed, and the owner-pin early-return gate refused a body with
several `return Err(..)` exits.

- propagation_witness: an Err(Type::V { .. }) built on the probe's own
  line with a call-free payload completes the error witness.
- owner_pin: an ErrVariant gate pins when every other exit is Ok or a
  different variant, the body has no `?`, and the enum derives
  PartialEq over value-compared fields.
- reveal: a payload change on error_path/return_value now needs a
  whole-value equality (owner pin or a written-out assert_eq!). A
  variant-only matches! no longer confirms it (RIPR-SPEC-0107 amended).
- Seam caches 1.74 -> 1.75 and 0.80 -> 0.81; provenance hashes refreshed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF96T8WMLipviRmdgetFpK

* Tie the payload pin to the owner call and refuse every second builder

Review on #7063 found three false-exposed paths: a bare or imported
second spelling of the variant, an equality on another function's
result, and sibling exits that are really constants or method calls.

- Drop the written-out equality route; a payload-only change is
  confirmed only by the owner-return pin.
- The ErrVariant pin admits owner(..).unwrap_err()/expect_err() bound
  or direct, never another call's result.
- Sibling exits must be declared variants whose Err argument ends at the
  payload; an owner file importing the enum's variants refuses the pin;
  rebinding and field-attribute refusals apply.
- RIPR-SPEC-0197 rules 1-7 with named residuals (tuple ok_or?, literal
  field patterns on error_path/return_value).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF96T8WMLipviRmdgetFpK

* Complete the error witness only for a declared workspace enum variant

Second review on #7063: an aliased, type-aliased, Self:: or module-path
spelling kept the unchecked Err head gate while the new witness still
completed, and a re-qualified path read as a variant change.

- The error witness completes only when the owner file names a declared
  workspace enum that declares the variant; other spellings keep main's
  candidate witness.
- payload_pin_required compares the two trailing path segments.
- A sibling exclusion (assert_ne!, !matches!) no longer confirms a
  payload-only change.
- Test-file enum rebinding refusal gets a test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF96T8WMLipviRmdgetFpK

* Pre-filter workspace enum lookup by declaration; fix spec heading slip

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF96T8WMLipviRmdgetFpK

* Name only bare or crate:: error variant paths as a workspace enum

Devin review of #8114: the pin and the error witness read a variant path
by its two trailing segments, so external::E::V borrowed a local E's
derived equality. A prefix other than crate:: now names no declared enum,
and the spec says so. The new refusals fail on the old rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF96T8WMLipviRmdgetFpK

* Skip the uv marker case in the Rust-only feature lane

#8131's scalar_marker test writes a [tool.uv.workspace] marker, which a
binary built without lang-python refuses, so the Rust-only feature lane
is red on main since 8a55a5b. The uv case now runs only with
lang-python; the cargo, git and unmarked cases still run in both lanes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF96T8WMLipviRmdgetFpK

* Renumber the lane's seam-cache bump to 1.79/0.85 and refresh its receipts

Main allocated 1.78/0.84 first (#8102), so the early error-variant pins
take the next versions. The corpus-authority test pins, the two
OUTPUT_SCHEMA.md receipt examples, and the unchanged-after-attempt
provenance chain (commitments recomputed with raw_json_placeholder_v1;
raw artifact and verify hashes refreshed in the receipt) follow the same
renumber. Verified: the recomputation reproduces the 1.78 refresh bytes
exactly before applying the same procedure at 1.79.

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Oct 16, 2026
* fix(rust): an empty-collection expectation cannot confirm a push (#8051)

A test that passes with `assert_eq!(p.log, vec![])`, `assert!(p.log.is_empty())`
or `assert_eq!(p.log.len(), 0)` after the owner call never ran the owner's
push on that path, so deleting or changing the push leaves it passing.
Reveal now treats such an assertion like a self-computed one for
call_deletion and side_effect probes on a collection push: it neither
confirms observation nor counts as a strong oracle.

New corpus case push-after-early-return-empty-assert (truth
not_discriminated by runtime mutants) holds the fix: its call_deletion and
side_effect findings were exposed before and are weakly_exposed now. No
other row moves.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THmnTJYPr5V99aEDNdTy86

* fix(rust): limit the empty-collection rule to pushes the owner can skip (#8051)

Review on #8141: a test that pushes then removes the element
(`add(1); remove(1); assert_eq!(items, vec![])`) does catch a changed push
argument, so discounting every empty expectation turned a correct exposed
into a wrong weakly_exposed advisory. The rule now applies only when the
owner may leave before the changed line (`owner_may_exit_before_line`,
sharing `may_exit_early`), which is how a passing empty expectation skips
the push. Also shares the empty-collection literal with `is_default_like`
and adds the negative `assert!(p.locked || p.log.is_empty())`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THmnTJYPr5V99aEDNdTy86

* test(cli): run the uv workspace-marker case only with lang-python

`scalar_marker_preserves_cargo_uv_git_and_unmarked_root_boundaries` (#8131)
fails in the Rust-only feature lane on main: a binary built without
`lang-python` refuses a repo with a `[tool.uv.workspace]` marker instead of
resolving its root. Skip that one case without the feature; the cargo, git
and unmarked cases still run in every lane.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THmnTJYPr5V99aEDNdTy86

* fix(rust): same-line early exits also skip a push, with per-form cap proof (#8051, #8141 review)

Devin review on #8141: owner_may_exit_before_line stopped at the start of
the changed line, so a guard sharing the line
(if self.locked { return; } self.log.push(1); on one line) left the
empty-collection cap unapplied and kept a false exposed. The scan now
runs to the changed expression's first occurrence on the line; an
expression blanked by masking keeps the line-start scan. A guard after
the expression on the same line still cannot skip the push.

Devin review on #8141: the new cap had no classifier-output controls per
assertion form. empty_collection_expectations_cap_effect_families_only_
after_an_early_exit drives each recognized form through the real reveal
path for both effect families: capped to weak and observation-unverified
only when the owner may exit early, keeping strength without an earlier
exit, and never capping a non-empty expectation.

Devin review on #8141: the rule had no spec/traceability mapping.
RIPR-SPEC-0228 documents the rule, its forms and the accepted owner-wide
limit; .ripr/traceability.toml maps the three behavior tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(rust): find the changed push in the owner body so quoted guards count (#8141 review)

CodeRabbit review on 9595d8d: the same-line scan searched the masked
body, so a push with a string-literal argument (self.log.push("x"))
never matched and a same-line guard before it kept a false exposed. The
mask blanks bytes in place (one space per byte), so the expression is
now located in the owner body itself and its offset reads the same in
the masked text. The unit test pins the quoted same-line guard as found
and the quoted push without an exit as still off.

Also records in RIPR-SPEC-0228 that the shared may_exit_early counts
any else (a let .. else block may exit through a never-typed call no
token catches), so an ordinary if/else completed before the push
widens the same conservative cap.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(rust): skip string and comment decoys when locating the changed push (#8141 review)

CodeRabbit review on 3fdbd49: the same-line scan took the first
occurrence of the expression in the owner body, so an earlier string
containing that text (let s = "self.log.push(1)"; if locked { return; }
self.log.push(1);) positioned the scan before the guard and kept a false
exposed. A candidate is now accepted only when its first byte survived
the mask (executable code); string and comment occurrences are skipped
and no executable occurrence keeps the line-start scan. The unit test
pins the decoy-string case.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

fix(discovery): clarify structural package workspace markers

1 participant