Repository navigation
fix(typescript): read a jest projects array of inline objects instead of refusing the snapshot (#10139) - #10158
Conversation
…cts key) Adds authored-ts-jest-snapshot-projects and the case jest-spec0258-ex08-projects-key: jest.config.js holds only projects, the project config relocates snapshots, and a real jest run passes the edited package. TypeScript spec examples 152/153 -> 153/153, floor 153; no new false verdict (ripr reports weakly_exposed, the ideal gap). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
… of refusing the snapshot (#10139) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 44 minutes. View limit details
Comment |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP # Conflicts: # fixtures/typescript-verdict-corpus/spec-coverage.toml
…lled or preset by path (#10139) Review of record findings on #10158: .concat/.map after the array, spread or call inside a project, and a path preset all fed config this walk never read. Adds root/workspace-inside- project and concat/spread/call/preset rows to the unit test, fixes the corpus case's labeling commit, and updates the corpus SPEC subject list. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
…ne project (#10139) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
|
Review of record — head Angles (independent reviewer passes, each on a committed head of this branch):
Findings and resolutions:
Local proof on this head: Known limits, recorded and not fixed: computed keys built from expressions ( Nothing blocking remains from my side. Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm unscanned JavaScript expression forms remain a verification boundary rather than evidence of another implementation path.
- Confirm the strongest remaining concern is that the lexical scanner may misclassify an unusual but valid inline project object, rather than delegating safely.
Refuted
- without_plain_inline_projects may return borrowed references whose lifetimes are tied to a temporary reconstructed String.; refuted because: The helper returns Option by value. It performs borrowed slicing only while building that owned String and exposes no reference into it; the caller immediately passes the owned value by reference for the duration of delegates_to_other_config.
- The inline-projects change could introduce a stale length snapshot or resize/detach/transfer hazard.; refuted because: The helper reads immutable Rust strings and returns another immutable String; it neither exposes nor mutates a buffer whose visible length could become stale.
- Removing the inline projects array could expose snapshot data across a JavaScript runtime or worker-handoff boundary.; refuted because: The change is a synchronous text-analysis rule with no worker, channel, shared-memory, async, GC, detach, or transfer operation. It only removes a statically recognized array after rejecting dynamic or delegating spellings.
- The new corpus row only repeats the fixture's expected classification and does not establish that the changed analyzer route produces it.; refuted because: The corpus case invokes npm test on the whole package and the prior review reports the runtime mutant kill; however, this lane did not execute it, so no independent verdict is claimed.
- The fix broadens behavior beyond the stated production delta or duplicates the delegation rule in a fragile place.; refuted because: The behavior is isolated in two private helpers at the existing config-directory delegation boundary, reused by one call site, and backed by a focused unit test plus a corpus case; no public API or unrelated analysis path is changed.
- The new inline-projects exception could execute or trust delegated configuration content and expose secrets.; refuted because: The change only changes static source classification. It does not execute JavaScript, load referenced files, read credentials, or emit source contents; unsupported delegation forms remain refused.
Evidence gaps
- Automated repository-wide test confirmation is pending the scheduled cargo-test receipt.
- Model proof intent was rejected by deterministic validation.
- The corpus assertion exercises a runtime-discriminating committed snapshot, but its expected corpus result is represented by checked-in metadata rather than independently executed evidence in this lane.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Scoped independent review for #10139: REPAIR_REQUIRED at 1ae5e0e95d1fda6c8a0a3c09df720c9d52513d5a.
The existing writer and branch claude/ts-inline-jest-projects-10139 retain custody. No competing implementation, candidate edit, build, CI request, readiness change, or merge was made by this review.
-
[P1] A bare package preset still delegates to unread configuration.
preset_may_name_a_file(lines 432–436) treats every literal without a leading dot/slash or listed extension as safe. Thusmodule.exports = { projects: [{ preset: "review-snapshot-preset" }] };passes the new exception. But a package preset is precisely an external config: Jest resolvesreview-snapshot-preset/jest-preset.jsand merges its properties into the project. That file can exportsnapshotResolverorroots, and the directory walk does not inspect it. Removing the array then hides the only delegation marker and allows strong credit for a default-location snapshot the runner need not use. This is a new admission through the inline-project exception, distinct from the already-recorded computed-key/string-concatenation limitations. Jest preset contract; Jest resolver and merge implementation.Fix direction: keep unevaluated package presets fail closed, or restrict any supported exception to a deliberately established non-relocating preset contract. Do not equate package-name syntax with known config contents. Keep the direct non-relocating inline positive and
rootDir/roots/snapshotResolvernegatives. Confidence: high from exact source and Jest's loader; this lane did not execute the Rust/analyzer reproduction. -
[P1] Ordinary literal spellings retain the false-actionable path.
without_plain_inline_projects(lines 449–463) searches raw text and requires:immediately after trivia following the word. Both"projects": [{ displayName: "unit" }]and'projects': [...]therefore miss the exception; a harmless// unit projectscomment also makesfound.next().is_some()reject the same object. Fallbackdelegates_to_other_configrecognizes the real key and returns medium. The existing classifier then follows the weak-oracle gap route for the same otherwise-discriminating test. These are valid, non-relocating inline configurations, not unknown external configs. This leaves #10139's false-actionable behavior for common spelling-only variants. An executed Node control confirms the three variants evaluate to the same object as the bare-key positive.Fix direction: admit equivalent literal keys and ignore comment occurrences when recognizing the bounded inline object, or expose an honest limitation instead of an actionable weak gap when recognition is deliberately unsupported. The proposed test below uses strong admission; an explicit limited-classification control is also consistent with the issue's accepted fallback. Confidence: high for the source path and JavaScript equivalence; rendered ripr output remains unexecuted here.
Exact subject / basis:
head: 1ae5e0e95d1fda6c8a0a3c09df720c9d52513d5a
head tree: 96398466144f7fac5115f0bb9121aa3c19089b15
merge-base with fetched origin/main: 45bd4f9a5904812b9f91f0dfa425a7e791e3b469
merge-base tree: 7db2a869c000f29b4415960a0e708cc833657980
merge-base is the verified squash landing of prerequisite #10138
PR API base snapshot: 07e5959d4b848c90a6f1b1df3936ce380146b2a6
fetched main: 1818f481c279b84634c32ee19e9c23d199459967
fetched main tree: 83621868be9c417527d2bc79d7d1f52769abe566
bounded candidate diff: 17 files, +459/-5 (production: one config owner)
Inspected: complete 17-file change, config directory scan, delegation/key/preset helpers, snapshot promotion, classifier strong/weak consumers, SPEC-0258, new case/subject/expected row, all current Conversation comments and inline threads. Issue comments were empty on both custody reads; #10158 already owns the exact scope. Oracle extraction, skipped-describe, loop bounds, and the protected sibling work were left untouched. No schema/API/workflow/permission change is proposed.
Observed independent fixture checks (Node v24.19.0, native exit 0): all seven retained-file SHA-256 entries match the exact Git object; the new corpus source returns 140, its specified mutant returns 130, and the committed snapshot is 140; all three lexical variants evaluate to the same config object; explicit relocation controls parse as JavaScript. This is a source/fixture audit, not a run of Jest or ripr. Exact audit script and raw output follow below.
Other observed commands:
git diff --check 45bd4f9a5904812b9f91f0dfa425a7e791e3b469 1ae5e0e95d1fda6c8a0a3c09df720c9d52513d5a
# native exit 0; no output
git apply --check regressions.patch
# native exit 0 against an extracted exact-head test file; candidate unchanged
The proposed regression delta is test-only, 50 added lines, and has not been compiled or run. There is no installed cargo/rustc in this saved environment; existing older target binaries were not substituted for the candidate. Intended focused owner commands after applying the tests: cargo test -p ripr --lib inline_project and cargo test -p ripr --lib committed_snapshot. The first new external-preset assertion is source-predicted to find Strong instead of Medium; the quoted/comment positive assertions are source-predicted to find Medium instead of Strong. Those are predictions, not claimed red-run receipts.
Hosted proof observed: existing merge-ready run 40158714499, Rust job 121065637575, had successful policy/evidence-honesty/dependency/process/network/all-target/all-feature/Clippy steps; required tests were running and doctests/goldens/fixtures/verdict steps were pending when inspected. No new request was made. PR-reported 45 focused passes and earlier Jest runtime results remain reported evidence, not this review's execution.
Next obligation stays with this candidate: repair/dispose both findings, run the focused regressions (including positive and relocating negative controls), refresh substantive review for affected dimensions, and inspect all required checks/current conversations on the final published head before any ready/merge decision. Existing CI in flight is not merge clearance. Unrelated main movement alone is not a request to restack or repeat unaffected proof.
Storage/proof handling: review-only scratch, no worktree/target/binary allocation; scratch outputs budgeted under 1 MiB peak against 32.0 GB observed free and a retained 5 GB floor. Existing targets/witnesses were preserved. The regression patch and audit are included here so another environment can inspect them without this scratch directory.
Reproduce the fixture audit by saving the attached audit.cjs outside the candidate and running node /path/to/audit.cjs from the repository root. The portable path placeholder is deliberate; Git reads are bound to the full head SHA in the script. No software installation is needed.
Proposed regression patch (unexecuted)
--- a/crates/ripr/src/analysis/language/typescript/tests/committed_snapshot_tests.rs
+++ b/crates/ripr/src/analysis/language/typescript/tests/committed_snapshot_tests.rs
@@ -1787,3 +1787,53 @@
}
Ok(())
}
+
+/// A package preset is another configuration source even when its name
+/// has no file suffix. Its contents are outside the config-directory walk.
+#[test]
+fn inline_project_unknown_package_preset_stays_medium() -> Result<(), String> {
+ let jest = jest_snap(&[("price 1", "140")]);
+ assert_eq!(
+ strengths(
+ "snap-inline-external-preset",
+ PRICE_TEST,
+ &[
+ (SNAP_PATH, &jest),
+ (
+ "jest.config.js",
+ "module.exports = { projects: [{ preset: \"review-snapshot-preset\" }] };",
+ ),
+ (
+ "node_modules/review-snapshot-preset/jest-preset.js",
+ "module.exports = { snapshotResolver: '<rootDir>/moved.cjs' };",
+ ),
+ ],
+ )?,
+ vec![OracleStrength::Medium],
+ );
+ Ok(())
+}
+
+/// Quotes and comments do not turn a plain inline project into another
+/// configuration source. Keep a nonempty exact oracle-strength assertion.
+#[test]
+fn inline_project_literal_key_spellings_keep_snapshot_credit() -> Result<(), String> {
+ let jest = jest_snap(&[("price 1", "140")]);
+ for text in [
+ "module.exports = { projects: [{ displayName: \"unit\" }] };",
+ "module.exports = { \"projects\": [{ displayName: \"unit\" }] };",
+ "module.exports = { 'projects': [{ displayName: \"unit\" }] };",
+ "// unit projects\nmodule.exports = { projects: [{ displayName: \"unit\" }] };",
+ ] {
+ assert_eq!(
+ strengths(
+ "snap-inline-literal-keys",
+ PRICE_TEST,
+ &[(SNAP_PATH, &jest), ("jest.config.js", text)],
+ )?,
+ vec![OracleStrength::Strong],
+ "{text}",
+ );
+ }
+ Ok(())
+}
Independent source/fixture audit
// Source/fixture audit only. This does not execute ripr or Jest.
const assert = require('node:assert/strict');
const {execFileSync} = require('node:child_process');
const {createHash} = require('node:crypto');
const vm = require('node:vm');
const {stripTypeScriptTypes} = require('node:module');
const head = '1ae5e0e95d1fda6c8a0a3c09df720c9d52513d5a';
const root = process.cwd();
const read = path => execFileSync('git', ['show', `${head}:${path}`], {cwd: root, encoding: 'utf8'});
const prefix = 'fixtures/typescript-verdict-corpus/';
const id = 'authored-ts-jest-snapshot-inline-projects';
const manifest = JSON.parse(read(`${prefix}subjects/${id}.json`));
assert.equal(manifest.subject_id, id);
for (const row of manifest.retained_files) {
const bytes = read(`${prefix}subjects/${id}/${row.path}`);
assert.equal(createHash('sha256').update(bytes).digest('hex'), row.sha256, row.path);
}
console.log(`retained-file hashes: ${manifest.retained_files.length}/${manifest.retained_files.length} match exact head`);
const casePath = `${prefix}cases/jest-spec0258-ex08-inline-projects.json`;
const row = JSON.parse(read(casePath));
assert.equal(row.subject_id, id);
const source = read(`${prefix}subjects/${id}/src/priceSnapInline.ts`);
const snapshot = read(`${prefix}subjects/${id}/test/__snapshots__/priceSnapInline.test.ts.snap`);
const snapshotMatch = snapshot.match(/exports\[`priceSnapInline 1`\] = `([0-9]+)`;/g);
assert.equal(snapshotMatch?.length, 1);
const expected = Number(snapshotMatch[0].match(/= `([0-9]+)`;/)[1]);
const replacement = row.truth.mutants[0].replacement;
assert.equal(source.split('return amount - 10;').length, 2);
const mutant = source.replace('return amount - 10;', replacement);
const diff = read(`${prefix}${row.diff}`);
assert.ok(diff.includes('- return amount - 10;\n+ return amount - 20;'));
const run = text => vm.runInNewContext(`${stripTypeScriptTypes(text).replace('export ', '')}\npriceSnapInline(150);`);
const baseline = run(source);
const edited = run(mutant);
assert.equal(baseline, expected);
assert.notEqual(edited, expected);
console.log(`independent snapshot-value witness: baseline=${baseline}, edited=${edited}, committed=${expected}; baseline matches, edit differs`);
const evaluate = text => {
const context = {module: {exports: {}}};
vm.runInNewContext(text, context);
return JSON.parse(JSON.stringify(context.module.exports));
};
const canonical = evaluate('module.exports = { projects: [{ displayName: "unit" }] };');
const positives = [
'module.exports = { "projects": [{ displayName: "unit" }] };',
"module.exports = { 'projects': [{ displayName: \"unit\" }] };",
'// unit projects\nmodule.exports = { projects: [{ displayName: "unit" }] };',
];
for (const text of positives) assert.deepEqual(evaluate(text), canonical);
console.log(`plain-inline lexical variants: ${positives.length}/${positives.length} evaluate to the same object as the bare-key control`);
for (const [key, value] of [
['rootDir', 'pkg'], ['roots', ['<rootDir>/pkg']], ['snapshotResolver', '<rootDir>/moved.cjs'],
]) {
const text = `module.exports = { projects: [{ ${key}: ${JSON.stringify(value)} }] };`;
assert.deepEqual(evaluate(text).projects[0][key], value);
}
console.log('relocating inline controls: rootDir, roots, snapshotResolver are valid JavaScript config objects');
const external = evaluate('module.exports = { projects: [{ preset: "review-snapshot-preset" }] };');
assert.equal(external.projects[0].preset, 'review-snapshot-preset');
console.log('external preset control: bare package name is a valid inline preset value (Jest resolution semantics established separately from upstream source)');
console.log('PASS: 7 hashes, one baseline/edit value pair, 3 equivalent inline variants, 3 relocation controls, 1 external preset input');
console.log('NOT RUN: Rust regression tests, ripr CLI, Jest runtime; this audit is not analyzer qualification');Raw audit output (exit 0)
retained-file hashes: 7/7 match exact head
independent snapshot-value witness: baseline=140, edited=130, committed=140; baseline matches, edit differs
plain-inline lexical variants: 3/3 evaluate to the same object as the bare-key control
relocating inline controls: rootDir, roots, snapshotResolver are valid JavaScript config objects
external preset control: bare package name is a valid inline preset value (Jest resolution semantics established separately from upstream source)
PASS: 7 hashes, one baseline/edit value pair, 3 equivalent inline variants, 3 relocation controls, 1 external preset input
NOT RUN: Rust regression tests, ripr CLI, Jest runtime; this audit is not analyzer qualification
(node:1027) ExperimentalWarning: stripTypeScriptTypes is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
|
Additional independent boundary review: REPAIR_REQUIRED at head [P1] A regex grouping parenthesis preserves the false actionable path. In without_plain_inline_projects, every globals: { tag: /a(b)/ },The exact production helper refuses this nondelegating config; changing the regex to Observed: With that property and the fixture's original test selection, Additional local proof: Repair direction: In the existing candidate, distinguish regex contents from call/delimiter tokens, or represent unsupported expressions without an actionable weak gap. Add the regex fixture as a promotion/corpus regression and reconcile SPEC-0258's inline-object claim. Confidence: high for helper refusal and runtime discrimination. The concurrent independent review separately reports package-preset and literal-key gaps; this comment neither duplicates nor clears them. Earlier author-reported 45 passes remain separate evidence. All experiments were isolated, labeled, reverted and unpublished as implementation; the review tree is clean. The test-only experimental patch SHA-256 was |
…r commented projects keys (#10139) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
…ject (#10139) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
|
Repairs for both REPAIR_REQUIRED reviews — head All three P1 findings were reproduced against the helper and repaired in this candidate:
Evidence at this head:
Known limits, unchanged and recorded: computed keys built from expressions ( I'm re-applying Generated by Claude Code |
|
Same-lane repair verification: REPAIR_REQUIRED remains, for a new regression in comment blanking. The original regex finding is repaired. Subject: head [P1] CR/Unicode line terminators hide a real second delegating projects key. blank_comments, lines 469–477 ends module.exports = { projects: [{}], // first<CR> projects: ["./other.config.js"] };JavaScript uses the second key, but the new blanking pass erases it. The helper strips the first array and admits the config. Executed exact-head CLI: the corpus source edit receives one Fix direction: make Passed missing acceptance: the unmodified current corpus config, containing the exact Local build: Hosted run 40164647045 was already executing required tests when inspected; no duplicate request or all-green claim. No implementation edits, canonical branch changes, review resolutions, Ready changes or merge. Next stays with the canonical writer: repair these terminator negatives, then refresh affected exact-head proof/review. |
…s when blanking (#10139) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
|
Line-terminator repair — head Your P1 on Repair: one Proof at this head: Re-applying Generated by Claude Code |
There was a problem hiding this comment.
Verification questions
- Confirm the Rust spelling test is implementation-coupled and can remain green if the helper and its expected labels drift together.
- Confirm the new scanner duplicates lexical parsing already available in skip_trivia and related helpers, increasing maintenance cost and the chance that comment, regex, and delimiter handling diverge.
- Confirm the acceptance helper is placed at the configuration-delegation boundary, but its name and implementation model the entire projects array rather than only the accepted plain inline-object subset.
- Confirm the corpus subject demonstrates the claimed runtime route: an inline Jest project, committed snapshot, and behavior-changing edit labeled credited/exposed.
- Confirm the implementation uses lexical scanning rather than parsing JavaScript, so unusual valid object syntax may still be misclassified even after the listed repair cases.
Refuted
- The documented inline-project exception says projects have no
projectskey, butdelegates_to_other_configmay also reject nested project arrays and the unit test explicitly expects medium for that spelling. - The unit table is only reach-only because every case resolves to a snapshot oracle.; refuted because: The table varies delegation-sensitive spellings and asserts Strong versus Medium, so it checks the analyzer's oracle-strength classification rather than merely proving code paths execute. Its limitation is independent semantic validation, not reachability.
- The inline-projects parser could expose stale or transferred JavaScript-owned memory across an async or worker boundary.; refuted because: The changed code only scans Rust string slices, constructs owned Strings, and returns immutable owned values; no JavaScript-backed memory or concurrency handoff is involved.
- The scanner may create a stale length snapshot, resize, detach, or transfer hazard while consuming comments and arrays.; refuted because: The implementation reads immutable Rust strings and builds a separate owned output String; it does not expose or mutate a buffer whose visible length can become stale.
- The change could resize, detach, transfer, or otherwise invalidate an active view over the scanned buffer.; refuted because: Rejected because the implementation contains no mutable buffer, TypedArray, ArrayBuffer, unsafe pointer, resize, detach, or transfer operation; it only borrows &str slices and builds fresh owned Strings.
Evidence gaps
- The new corpus case has a discriminating runtime oracle, but its mutant-kill evidence is supplied as fixture metadata rather than a checked-in execution trace.
- Model proof intent was rejected by deterministic validation.
|
The required check on Generated by Claude Code |
…nts as ts-jest (#10139) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP
There was a problem hiding this comment.
Verification questions
- Confirm accepted inline projects may still affect snapshot resolution without containing a prohibited delegation key.
- Confirm the corpus subject exercises the claimed runtime route: an inline Jest project, committed snapshot, and behavior-changing edit that fails the edited package.
- Confirm the spelling unit test is implementation-coupled: helper and expected labels can drift together.
- Confirm the implementation uses a hand-written lexical scanner for valid JavaScript objects; unusual syntax not represented in the table may be misclassified.
Refuted
- The helper might retain borrowed references tied to a temporary reconstructed String and expose a stale-length or buffer-transfer hazard.; refuted because: All borrowed slices are local to string construction; no reference or mutable buffer escapes. The function returns an owned String, and the change contains no detach, resize, transfer, unsafe, or concurrency operation.
- The new scanner could expose snapshot data across a runtime or worker-handoff boundary through stale or aliased native state.; refuted because: The changed seam performs ordinary owned string manipulation and returns plain Rust values; it neither shares buffers between threads nor crosses a runtime boundary with borrowed state.
- The quoted displayName value "projects" is a newly introduced false-positive requiring a fix in this PR.; refuted because: The seeded thread records that the shared mentions_named_key behavior predates this change, and #10295 owns that separate scanner improvement; broadening this PR to rewrite shared key recognition would exceed its one-production-behavior scope.
- The scanner may return borrowed references tied to a temporary reconstructed String.; refuted because: The implementation returns Option by value. Borrowed slices are temporary inputs to formatting and never escape; there is no live mutable backing store whose size could later become stale.
Evidence gaps
- A base-plus-tests control is not evidenced for the new corpus case.
- Model proof intent was rejected by deterministic validation.
Parked follow-ups
- The quoted-value false-positive such as displayName: "projects" affects shared key scanners beyond this PR's new helper; the seeded thread records it as known behavior owned by #10295.
- The implementation duplicates lexical responsibilities already present in nearby trivia, comment, string, and delimiter handling, creating a maintenance divergence risk.
|
Review of record — head Angles: parser fail-closed behaviour (preset, key spelling, comments, regex, line terminators); tests, SPEC-0258 and corpus parity; hosted proof. Findings and resolutions across the PR's life:
Proof at this head: required Known limits, recorded: computed keys built from expressions ( Disposition: nothing blocking. Merging by squash on this exact head. Generated by Claude Code |
Requested by Steven · project thread
Summary
main.projectsmakes a snapshot test that does catch the edit read weakly_exposed (false actionable) #10139: ajest.config.jswhoseprojectsholds only inline objects made the committed-snapshot reading refuse, so a snapshot test that does catch the edit readweakly_exposed(false actionable).without_plain_inline_projectsincommitted_snapshot.rsremoves oneprojects: [ {…}, {…} ]array when every element is an inline object with norootDir,roots,root,workspace,projectskey, no file-namingpreset, and no template placeholder. Any other spelling (path/glob/identifier/spread element, call, secondprojects, unbalanced text) returnsNoneand keeps the old refusal.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: RIPR-SPEC-0258 (rule text, example 8 and Test Mapping amended)
Governing issue or accepted claim: #10139
Acceptance delta (one sentence): An inline-only
projectsconfig reads the committed snapshot instead of refusing.Candidate Relationships
Stack parent or prerequisite PR (if any): none (#10138 merged)
Scope
Scope Classification
Production delta:
committed_snapshot.rs:without_plain_inline_projects,preset_may_name_a_file,delegates_beyond_plain_projects, used in the config-directory scan for Jest files.Evidence/support delta:
plain_inline_projects_keep_the_credit_and_every_other_spelling_refuses(about 24 spellings).jest-spec0258-ex08-inline-projects, subjectauthored-ts-jest-snapshot-inline-projects. Real run (node 22.22.0, jest 30.5.2, ts-jest 29.4.14): passes on the unedited package and fails on the edited one. ripr:exposed, outcomeideal. TypeScript false verdicts stay 9 (now over 354 cases).Single acceptance criterion:
exposedfor the inline-projects case,weakly_exposedstill for path, resolver and relocation spellings.Non-goals:
workspace, or Vitest.Support-tier Impact
Policy Impact
Proof
Claim Boundary
Claims: inline-only Jest
projectsarrays read. Does not claim other delegating spellings read. Known limits: computed keys built from expressions, and a string-concatenatedpresetpath.Rollback
Revert the commit.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP