Repository navigation
fix(gate): the scope manifest scan stops once a budget is exceeded unless truncation is accepted (CC-697, refs #781) - #788
Merged
Conversation
…less truncation is accepted (CC-697, refs #781) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESW7P9wHJRbhxx3v7XyQuq
…(CC-697) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESW7P9wHJRbhxx3v7XyQuq
…can_stopped_early (CC-697, refs #781) Review round 1 (critic, qa-tester, architecture, security, risk): all five had no blocking finding; security, architecture and risk each asked for the lower-bound fact to be in the manifest the user inspects, not only on stderr. The flag is now a local published with the other scan results, the report reads it from the manifest, and it says acceptance covers the full scan. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESW7P9wHJRbhxx3v7XyQuq
… -t (CC-697) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESW7P9wHJRbhxx3v7XyQuq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_gate_scope_expansions_collect_into) stops between sources once a source, symbol, search-match or contract-consumer budget is already exceeded and--accept-scope-truncationis not set. Those counters only grow, so the verdict is already INCOMPLETE and the rest of the scan (about 1 s per source on native Windows) only delays the report (Native Windows: 127 个变更路径的 full-tier gate,scope manifest 耗时 495 秒后因预算超限 INCOMPLETE,派审查员之前已用掉 8 分钟 #781: 495 s for 127 paths).truncation.scan_stopped_early: true(present only then; added tocore/schema/gate-scope-manifest.schema.jsonand the generatedgate-structural-schemas.json). The INCOMPLETE report reads it from the manifest, says the omitted counts are lower bounds and the expansion list is partial, and says acceptance covers whatever the full scan omits.--accept-scope-truncationscans everything as before and never carries the field.Refs #781 (stays open).
Verification (native Windows)
bash tests/shell/test-pr-gate.sh --filter "scope-manifest/": all 9 cases pass, including the existing exact-count overflow case and the new one (which now also assertsstatus == incomplete, the field present, and the field absent on the accepting run).scan_stopped_early: trueand rejectsfalseon a real manifest;gate-structural-validator.sh --checkandlint-script-domain-inventorypass.test-core-schemas.shcannot run its jsonschema cases on this host (CLI not installed).Review (commands/ship.md Steps 2.5 and 3)
Step 2.5: one tidy-up (a continuation line), no reusable helper exists.
pmctl gate runcould not finish: codex returned "Selected model is at capacity" twice, and the claude executor's reviewers were refused the pre-writeguard checkin a session with no approval surface. No Final verdict exists from the gate.Per-reviewer review with five subagents (critic, qa-tester, architecture-reviewer, security-reviewer, risk-reviewer) on the first commit pair: no block or high finding from any. Actions taken: manifest field instead of a stderr-only note (security, architecture, risk, critic), local flag published with the other results (architecture F2), reworded acceptance guidance (risk). Not taken: passing
ACCEPT_SCOPE_TRUNCATIONas a parameter (architecture F3, low), adding diff-hunk overflow to the stop condition (critic, a missed optimisation only), variant tests for the source/symbol/contract-consumer terms and a later-source-only overflow (qa-tester, low; the 257-source fixture is too slow on Windows).The second commit (manifest field) was not reviewed again.
Permanent test admissions:
scope-manifest/overflow-stops-scan-unless-acceptedis a new permanent test. It pins behaviour nothing else covers (a scan stopping after the first overflow with the field recorded, and an accepting run still counting both sources: 1 versus 2, without the field), it has a cheap deterministic fixture, and no existing case could assert it without changing its meaning.🤖 Generated with Claude Code
https://claude.ai/code/session_01ESW7P9wHJRbhxx3v7XyQuq