Repository navigation
Keep synthetic Git-path fixtures from failing the public boundary check - #9039
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, max)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
维护者发布前运行的公开边界检查会扫描已跟踪的 Git 路径回归测试。base 的测试源码触发六条规则命中。当前提交保留运行时合成输入,同时通过测试文件自身的发布检查。范围为一份现有测试文件和配套扫描入口。
改动思路 / Approach
复用既有扫描器和 canary。六处合成输入集中在同一测试文件,路径、行号和命中规则仍由独立断言验证。精确 diff 只改 fixture 定义及使用它的测试输入。两份精确提交的完整测试文件和同一合成运行时输入均经实际 CLI 对照验证。
具体改动 / Changes
精确 head 6ac7356870606a7985a97b73ce54e6d1d339051b,diff base 1c38823e59a55bbd4d6906fa23e5ba84375c71a1,1 个文件 +10/-6。逐项复核 source-scans、negative-input-preserved。验收约定
关键代码讲解
- 共享 fixture 保留原运行时输入,发布扫描仍读取完整测试文件。源码
- 不能解码的路径和同名转义形式各自保留路径、命中规则和行号断言。源码
- 临时 Git 仓库的显式扫描根继续覆盖特殊路径,命中仍阻断检查。源码
对主干的风险 / Risks
测试源码的阻断项由 6 降为 0。同一运行时输入在两版均有 1 条阻断并退出 1。三组相关测试两边都是 241 项通过、6 项平台或文件系统用例跳过。独立扫描覆盖改动文件。
语义与 CI 对齐
现有入口继续判断扫描规则、范围和路径所有权。原测试独立断言拒绝结果与路径定位。
我的整体评价 / Verdict
通过当前精确提交。改动消除了已跟踪测试文件的误报,同时保留发布守卫的负例和路径诊断覆盖。
English verdict: APPROVE. The tracked fixture now passes the normal boundary scan, while the identical synthetic runtime input still blocks and Git path diagnostics retain their coverage.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
6ac7356 to
c37ed1c
Compare
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
审批结论 / Approval conclusion
动机 / Motivation
Maintainers and CI need repository-wide public-boundary results to distinguish real leaks from test fixtures. Six hard-coded synthetic task IDs made the tracked Git-path test itself fail the scanner. The new fixture composes the same value at runtime and reuses it, without changing scanner rules or temporary inputs.
affected_caller_or_operator: Maintainers and CI running repository hygiene or public-boundary scans.before_after_scenario: The baseline reported six synthetic task-ID findings; the candidate keeps the same temporary inputs and expected blocking hits while the tracked source scan has zero errors.observable_outcome: All Git-path tests still detect the synthetic internal ID, while the tracked suite no longer contains the standalone forbidden literal.non_goals: Does not weaken the public-boundary scanner, ignore test files, or change production detection.
改动思路 / Approach
_SYNTHETIC_TASK_TEXT is constructed from two harmless pieces and reused wherever a temporary fixture needs the forbidden shape. The production scanner still reads the tracked suite and temporary files unchanged.
具体改动 / Changes
关键内容讲解
- The shared runtime token replaces six hard-coded fixture literals.
- Temporary files still receive the composed value, so the scanner's positive negative-case behavior is preserved.
- The repository's production matching rule and scan roots are untouched.
对主干的风险 / Risks
This is test-only. The strongest counterexample is hiding the token so temporary inputs no longer trigger the scanner; the affected tests still assert the blocking hits. The focused suite passed 13 with 6 platform skips, and quick premerge passed all direct checks.
我的整体评价 / Verdict
The repair removes a concrete repository-wide false positive without suppressing or duplicating coverage. It improves maintainability and keeps the same negative oracle, so no separate smoke should be added.
English verdict: APPROVE for c37ed1c. Runtime-composed fixtures preserve scanner rejection while removing six tracked-source false positives.
Problem
The repository-wide public boundary check fails on six hard-coded synthetic task IDs in the Git path test suite. Those values are fixtures for the scanner's negative cases.
Change
Build the same synthetic text when the tests run and reuse it across the affected fixtures. The scanner still reads the entire tracked suite and the temporary input files still exercise the same blocking rule.
Validation