fix(p6): distinguish report-format headings from prompt extraction - #513
fix(p6): distinguish report-format headings from prompt extraction#513chrisknvidia wants to merge 5 commits into
Conversation
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
[SkillSpector Review]
Reviewed head ec52f0f8173e0a797179f2fe75abd5793b4bef54 — APPROVE.
The complete-source preparation prevents a formatting heading from being exempted on ambiguous or reconstructed command context, preserves exact source mapping across bounded views, keeps P7/P8 semantics unchanged, and repairs JSON stdout plus static-only invalid-provider isolation with coverage. I found no required code or test changes.
Required checks pass, but GitHub reports mergeStateStatus=BEHIND. The PR body also explicitly says to keep the change pending maintainer review and release coordination; treat that as a hold even after updating and re-running checks.
A complete formatting label such as
## HTML Output Rules (Offline-Safe)incorrectly raises HIGH P6. This change exempts its mapped noun span while retaining instructions that use the heading as a command, including framing recovered from markup or obfuscated text.Refs #512. Keep this PR in draft pending maintainer review and release coordination.
Heading decisions are prepared once from complete source context, then mapped into bounded raw, normalized, reconstructed and overlapping scan views before finding-budget accounting. P6 matches survive window boundaries, with opt-in whitespace and invisible-separator interpretations. Other analyzers keep their existing input semantics; P7/P8 detection patterns are unchanged. Ambiguous context, headings longer than 4,096 characters, or source/normalized context beyond 1,048,576 characters retain conservative detection. Absolute coordinates are resolved lazily to avoid allocating full per-character maps during prepared analysis.
A separate commit repairs two CLI defects found during verification: recursive JSON stdout now contains the structured report with progress on stderr, and invalid provider configuration permits static-only scans while enabled LLM scans reject it cleanly.
Validation at
ec52f0f8173e0a797179f2fe75abd5793b4bef54:Lazy source lookup lowered the measured P6 CPU cost on the oversized-artifact fixture from 2.09 seconds to 1.60, versus 1.58 on base, with unchanged resource limits. Independent offset-equivalence checks and the hosted oversized-artifact regressions pass.
Scope: this resolves the report-heading false positive and the reviewed detection/CLI regressions. Arbitrary prose noun phrases remain outside the heading exemption. No release, merge or production adoption is included.