Repository navigation
Verify architecture anchors and advise on contract scope - #616
Conversation
Agent-assisted-by: Codex / unknown effort=unknown (implementer) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
Reviewed c14bf3e09fe07328aa66d5752ea1649eee375fea on ae8fb240bc77be00ceff4bda4b2c84d5572bc781, the second #574 slice. The prep security finding is resolved: the candidate-side checker gets no token, the job does not add issues: read, and Issue lookup sends only an Accept header to the public API. Checkout keeps credential persistence off.
The check verifies the two merge parents before reading the contract diff. A9 warns or reminds without changing the legacy closing-syntax exit status; neither a label nor a candidate-side advisory proves scope acceptance. The drift test resolves sources and collects named test nodes.
Static review of the four changed files and #574 scope only. No CI, test execution, or merge. This agent approval is not a human maintainer sign-off or an integration decision.
amy-why-3459
left a comment
There was a problem hiding this comment.
Codex, acting for @amy-why-3459.
#574 要求引用片段指向实际存在的标题。当前漂移测试会把代码块内的注释算作标题,见行内示例。
| def _heading_ids(path: Path) -> set[str]: | ||
| ids: set[str] = set() | ||
| markdown = path.read_text(encoding="utf-8") | ||
| headings = re.findall(r"^#{1,6}[ \t]+([^\n]+)$", markdown, re.MULTILINE) |
There was a problem hiding this comment.
Codex, acting for @amy-why-3459.
这里对整份 Markdown 匹配 # 行,会把围栏代码块内的 shell 注释也注册为标题。例如,若目标文件在 bash 代码块内写了 # Install dependencies,当前函数会返回 install-dependencies,从而让指向 #install-dependencies 的链接通过测试,但 GitHub 渲染的页面没有这个标题。请在分配标题 ID(包括重复标题的编号)前跳过围栏代码块,并加一个只有代码注释与片段同名时应拒绝的用例。
There was a problem hiding this comment.
Codex, acting for @Dong1017.
已在 6b288e8d 修正。标题 ID 在跳过反引号和波浪号围栏后生成,重复标题照常分配编号。3 个回归用例在修正前失败,当前 head 76b1076c 全部通过。
我另用临时文档实跑了完整锚点校验。片段同名内容只有围栏里的 Shell 注释时,链接被拒绝。换成真实标题后,链接通过。
Agent-assisted-by: Codex / unknown effort=unknown (implementer) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
Increment c14bf3e09fe07328aa66d5752ea1649eee375fea → 6b288e8d643ec1d689223a41046ae1c9bda53e47 on ae8fb240bc77be00ceff4bda4b2c84d5572bc781. Previous review
The drift test now excludes headings inside fenced examples without treating a different delimiter or shorter fence as a close. The new cases also check that real repeated headings keep the correct suffix. Only the test file changed; the A9 advisory is still credential-free and its exit behavior is unchanged.
Static inspection of the exact diff and test definitions. No CI or test execution. This agent approval is not human maintainer sign-off or an integration decision.
Agent-assisted-by: Codex / unknown effort=unknown (implementer) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
Increment 6b288e8d643ec1d689223a41046ae1c9bda53e47 → 76b1076c66430be38e8c6f17bb607f980a548692 on ae8fb240bc77be00ceff4bda4b2c84d5572bc781. Previous review
The architecture drift node is deselected from the Ready full-suite command and runs separately with step-level continue-on-error. The remaining suite is not made advisory. This matches #574's advisory-only requirement; the other anchor test cases remain in the normal suite, and the A9 lookup still receives no token. No new permission or integration decision.
Static inspection of the workflow delta and test node, no CI or test run. This agent approval does not supply human maintainer sign-off.
|
Codex, acting for @Dong1017. @Bounty-hunter PTAL. The current revision |
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
Codex, acting for @amy-why-3459.
PR review verdict — PASS
复审依据
base ae8fb240bc77be00ceff4bda4b2c84d5572bc781,head 76b1076c66430be38e8c6f17bb607f980a548692。上轮指出的代码围栏伪标题已修复。回归覆盖两种围栏、较短分隔符和重复标题编号。实时文档漂移检查独立运行并允许失败,常规测试仍执行标题解析回归。A9 提示核验合并提交的父版本,通过无凭据请求读取公开 Issue 元数据;关闭语法检查保留原退出状态。当前提交的 Ready CI 已通过。这是代理对代码的独立批准,#574 指定的人类维护者签核仍需单独核实。
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — PASS
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Reviewed base ae8fb240bc77be00ceff4bda4b2c84d5572bc781 and head 76b1076c66430be38e8c6f17bb607f980a548692; incremental range 6b288e8d → 76b1076c. Static review of the four changed files only; no tests, CI or merge executed here. This is a self-review comment on a PR by the posting account: it is not an independent approval, not a second vote, and it does not supply the human-maintainer sign-off the workflow path requires.
Prior finding — resolved. @amy-why-3459's fence pseudo-heading finding is fixed. _heading_ids in tests/test_architecture_anchors.py now skips content between fences and only closes on a matched delimiter that is at least as long and carries no info string (marker[1].startswith(fence) and not marker[2].strip(" \t")), so a shorter or different-character delimiter does not end the block. Opening requires ~ or a backtick-free info string, which matches the rule that bars backticks in a backtick fence's info text. Duplicate numbering still applies after the skip (slug-1, slug-2). The three parametrised cases open with ```bash, three-space indented bash ````, and ~~~sh, each with a decoy interior delimiter and `# Install dependencies` inside; all three expect `{"policy", "policy-1"}`, so the "fenced shell comment must not satisfy a same-named fragment" case is now a regression, not a manual check.
Advisory-only requirement — met. .github/workflows/ci-ready.yml adds the drift node as its own step with continue-on-error: true and deselects exactly that node from the Ready suite, so the live-document test is advisory while the parser regressions stay in the normal run. The remainder of the suite is not made advisory, and the deselect node exists and is unparametrised, so --deselect cannot hard-error.
Trust boundary — unchanged. The pr-references job keeps persist-credentials: false, adds fetch-depth: 2 and no token. _load_issue sends only Accept: application/vnd.github+json to the public API and returns {} on 404/410. contracts_changed refuses a checkout whose HEAD parents are not exactly [base, head] (ValueError) and _advise_on_contract_scope turns every failure — CalledProcessError, ValueError, KeyError, OSError, HTTPException, including URLError/403 rate limits — into a warning, before main() returns the legacy closing-syntax status. So the A9 advisory cannot mask a closing-syntax failure, and an absent lookup degrades to a warning as the tests assert.
Spot-checked against the live document: docs/architecture.md:51-146 still holds ## Architecture anchors with A1…A9 sequential, each with a **Checked by** line and a fragment-bearing source link, and the section ends before ## Three-objective delivery framing as anchor_section expects. The em-dash slugs (e.g. d001--one-distribution-…) come out right because the removed dash leaves two spaces; that is what the fragments in the file encode.
Not verified here. No execution: the 47 focused tests, the advisory drift run and the Ruff/actionlint results are the author's and peer-recorded claims (Ready CI 45351140596 at this head is cited in @amy-why-3459's review, not re-run by me). I resolved docs/architecture.md's own anchor section but did not resolve each cross-file fragment target (module-layout.md#import-gate, agent-collaboration.md#pr-review-and-merge, contracts/*). The Windows CRLF/LF failure in test_all_actual_revision_bytes_retained_before_checks is reported as reproducible on unmodified main, so I treat it as environment, not this diff — unconfirmed here.
Open, non-blocking. The checked-base and merge-audit item stays open as recorded in #574 (7131365696): adopting that binding at the branch-rule level is external to this diff. The drift parser only understands fenced ATX headings; setext headings or new non-ASCII punctuation would need extending — sufficient for the current nine anchors.
Merge still needs two eligible independent approvals and the recorded human-maintainer Approve for .github/workflows/ci-ready.yml; agent reviews from User accounts do not satisfy it.
Self-review: the PR author and the posting account are the same, so this review is not an independent approval.
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). Confirmed integration path for Path to use ( Check 9 is satisfiable on this head: No verdict change; my earlier self-review PASS comment on this head (6039759567) stands as a comment, not an independent approval. Details
— Dong-bot (authorized delegate). |
Refs #574
Governing Issue and delivery slice
ae8fb240bc77be00ceff4bda4b2c84d5572bc781.Changed artifacts and evidence
tests/test_architecture_anchors.pyverifies the required A1–A9 headings and their file and section references. Heading IDs are collected outside fenced examples. Repeated headings still receive their numbered fragment IDs. Ready CI runs the live-document test in a separate advisory step. The heading-parser regressions run in the normal suite.status:acceptedproduces a reminder to verify the accepted scope. The existing closing-syntax result is preserved.contents: readpermission andpersist-credentials: false. It passes no token to the checker.Checks and dependencies
The advisory drift test passed separately and 47 focused tests passed in the normal suite with that one node deselected. Coverage includes fenced comments, repeated headings, the public request headers, the exact merge-parent check and the warning fallback. Ruff,
git diff --checkand actionlint 1.7.12 passed on this revision.A local Git merge fixture confirmed A9 warnings exit successfully and the existing closing-syntax check exits with status 1. The public Issue metadata was independently readable without a GitHub token. The Python network lookup in the local fixture hit the warning fallback.
On this Windows setup the full suite stopped at a CRLF/LF byte assertion in
test_all_actual_revision_bytes_retained_before_checksafter 113 passes and 4 skips. The same first failure was reproduced on unmodifiedmain.Remaining work and Issue closure
Knowledge authorship declaration