Skip to content

fix(typescript): do not read a quoted string value as a projects/workspace/root key (#10295) - #10316

Merged
EffortlessSteven merged 5 commits into
mainfrom
claude/ts-string-values-not-keys-10295
Oct 25, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
claude/ts-string-values-not-keys-10295

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • mentions_named_key counted a string value ending in projects, root or workspace (for example displayName: "projects") as a delegating key, so a snapshot test that catches the edit read weakly_exposed. A new blank_value_strings reads the body of a quoted property value (label: "x", previous significant char :, followed by , or }) as spaces before the key scan. Quoted keys, computed keys, bracket members, and strings passed to calls or bound by = keep their text, so Object.defineProperty(c, 'root', ..) still refuses.
  • The scan returns its input unchanged on an unterminated string or comment, a template literal, or any / (regex or division), and when the blanked text would differ in byte length, so those cases keep the old refusal. The ... spread check in the inline-projects path runs on the blanked text.
  • Test rows in plain_inline_projects_keep_the_credit_and_every_other_spelling_refuses and a new vitest_string_values_are_not_keys_but_real_keys_still_refuse, both traced in RIPR-SPEC-0258.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Spec: RIPR-SPEC-0258
Governing issue or accepted claim: #10295
Acceptance delta (one sentence): A string value that merely contains projects, root or workspace no longer makes a TypeScript Jest/Vitest config read as delegating.

Candidate Relationships

Candidate branch: claude/ts-string-values-not-keys-10295
Stack parent or prerequisite PR (if any): none (follow-up to merged #10158)

Validation

  • cargo test -p ripr --lib committed_snapshot: 46 passed
  • cargo xtask precommit and check-traceability: pass
  • Independent read-only review rounds (correctness, tests/spec, re-review) found a regex-quote desync, a U+2028 offset bug and a call-argument regression; all fixed with discriminating rows.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP

…space/root key (#10295)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
@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 25, 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 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 172 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: 42e6c9cf-fa23-4f54-b2d3-b38a412182aa
Commits

Reviewing files that changed from the base of the PR and between e364776 and 2306ed2.

Files selected for processing: 5
  • .ripr/traceability.toml
  • changelog.d/10295-ts-string-values-not-keys.md
  • crates/ripr/src/analysis/language/typescript/committed_snapshot.rs
  • crates/ripr/src/analysis/language/typescript/tests/committed_snapshot_tests.rs
  • docs/specs/RIPR-SPEC-0258-typescript-committed-snapshot.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…ffsets, harden tests (#10295)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP

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

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • The delegated-key scan is applied to a slice of the already transformed text, but without_plain_inline_projects computes that slice using offsets from the original cleaned text.

Verification questions

  • Confirm the added tests cover quoted values, quoted/computed keys, real duplicate projects, and uncertain syntax cases.
  • Confirm blank_value_strings receives text after blank_comments has already removed comment text, so comment contents are not actually scanned for quote termination by this helper.
  • Confirm the source route scans every quoted string followed by a comma or closing brace as a value, without distinguishing an object property value from a standalone expression string.
  • Confirm the added tests cover ordinary quoted values, quoted keys, computed keys, templates, regex, and escaping, but do not cover comments containing quotes or unmatched quoted text.

Refuted

  • The PR's claim that quoted values are ignored is unsupported by an ambiguous-syntax counterexample.; refuted because: Rejected for the claimed ordinary quoted-value behavior; the tests also intentionally retain Medium for template literals, regex/division-like slash input, and malformed strings, matching the documented refusal semantics.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • Repository-executed validation is not yet available in the supplied evidence.
  • Focused cargo-test execution is the remaining trust dependency for the reported scanner behavior.

…ll refuse (#10295)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP

Copy link
Copy Markdown
Member Author

Response to the github-actions review on this PR, against head 39bf285.

  • Offset finding: blank_value_strings now fills each blanked char with len_utf8 spaces, and returns its input unchanged if the output length differs from the cleaned text. without_plain_inline_projects slices the transformed text only at offsets taken from the same byte-length text. A multi-byte (U+2028) row covers this.
  • "Any quoted string followed by ,/}": no longer true. Only a property value (previous significant char :) is blanked, so call arguments and = bindings still refuse. Rows added for Object.defineProperty(.., 'root', ..) and const k = 'projects', v.
  • Comments/unmatched quotes: blank_comments runs first, so comment text is never scanned. An unterminated string, a template literal or any / returns the input unchanged. Rows cover templates, regex and escapes.

Independent reviewers (correctness, tests/spec, re-review of the exact head) found a regex quote desync, the U+2028 offset bug and the call-argument regression. All three are fixed with discriminating rows. Local cargo xtask precommit and cargo test -p ripr --lib committed_snapshot (46) pass. Required check requested via merge-ready.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 25, 2026 12:06
@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 2 potential issues.

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.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm value normalization is applied twice in the projects-array path: once to the whole document, then again to an already normalized array slice.
  • Confirm the helper is documented as blanking every quoted property value, but implementation only blanks values whose following significant token is a comma or closing brace; other property-value contexts remain visible.
  • Confirm comments containing quoted delimiter text are behaviorally important but not directly covered by the new regression matrix.

Refuted

  • The implementation blanks every quoted property value ending before a comma or closing brace, which is broader than only values whose content resembles a delegation key.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • Executable success of the focused committed-snapshot suite remains dependent on the scheduled late cargo-test receipt.

…pses in project labels (#10295)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP

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

Decision

  • Needs one verification check before upstream.

Verification questions

  • Confirm the implementation detects quoted property values by previous significant ':' and requires the following significant token to be ',' or '}', so property values in contexts such as arrays, parentheses, or another property's continuation remain visible to the delegation scan.

Refuted

  • Any quoted string followed by a comma or closing brace is a property value and should be blanked.; refuted because: The implementation additionally requires a preceding colon, preserving dynamic-key contexts such as calls and assignments; tests cover those cases.
  • The helper should be generalized into a shared parser or broader string-scanning abstraction for this fix.; refuted because: The change addresses one source-specific false positive with bounded lexical behavior; introducing a parser or shared abstraction would exceed the smallest-complete-fix boundary and increase regression risk.
  • The PR body claims a new helper reads quoted strings followed by ',' or '}' as spaces, but the implementation only blanks property-value strings and deliberately retains strings in call arguments and '=' bindings.

Evidence gaps

  • Focused executable proof is still pending because the ripr sensor failed and cargo-test was scheduled late; source inspection and regression coverage are positive but not a substitute for the receipt.
  • Executable proof of the focused regression suite is not yet available: cargo-test is scheduled late and the ripr sensor failed with exit code 2.
  • Model proof intent was rejected by deterministic validation.

Copy link
Copy Markdown
Member Author

Review of record, head 2306ed2

  • Angles: (1) correctness and fail-closed, (2) tests/spec/contract, (3) re-review of the repaired head. Each reviewer worked read-only from the diff. The correctness reviewer built a scratch harness outside the repo. Devin and github-actions bot reviews were read as well.
  • Findings and resolutions:
    • A regex literal containing a quote desynchronised the string scan: the scan now bails on any / or backtick.
    • U+2028/U+2029 in a value string shifted byte offsets: blanking is byte-length-preserving, with a length guard.
    • Blanking hid call-argument and =-bound keys (Object.defineProperty(c, 'root', ..)): only label: "x" property values are blanked now.
    • A weak backtick row, no Vitest coverage, and a missing spec note: discriminating rows added (template, regex, escape, U+2028, call argument, const k = 'projects'), plus a Vitest test and a spec update.
    • Devin: the Vitest test was missing from .ripr/traceability.toml, and a quoted ... refused a plain project. Both are fixed and the threads are resolved.
    • github-actions bot: its offset finding is covered by the length guard. Other questions concerned PR-body wording, which is now corrected.
  • Evidence on this head: cargo test -p ripr --lib committed_snapshot (46), cargo xtask precommit and check-traceability pass locally. Required check Ripr Rust Small Result is success on this exact head.
  • Known limit: a config containing a template literal, a / (regex or division) or an unterminated string keeps the old refusal. That is a missed credit, not a false verdict.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 55e58c0 into main Oct 25, 2026
57 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/ts-string-values-not-keys-10295 branch October 25, 2026 13:26
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.

2 participants