Skip to content

fix(hygiene): cover GitHub's own rendered pages as live surfaces - #4954

Open
yuedai-pbc wants to merge 1 commit into
loopx-project:mainfrom
yuedai-pbc:yuedai/live-surface-github-metadata
Open

yuedai-pbc wants to merge 1 commit into
loopx-project:mainfrom
yuedai-pbc:yuedai/live-surface-github-metadata

Conversation

@yuedai-pbc

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Goal/source and gap: Closes [Task]: GitHub's own rendered pages are outside the live-surface hygiene check #4953. [Task]: Live surfaces and one relevance oracle still carry the pre-transfer repository address #4753 added a hygiene rule that fails when a live
    surface
    carries the pre-transfer repository address, and defined that surface by path
    prefix. The .github/ half of that prefix list stopped at workflows/, so the gate never
    looked at the files GitHub renders to the person about to contact this project —
    SECURITY.md, ISSUE_TEMPLATE/config.yml, ISSUE_TEMPLATE/bug_report.yml, SUPPORT.md,
    PULL_REQUEST_TEMPLATE.md and the ruleset link GOVERNANCE.md itself calls live. Twenty
    address uses across those six files stayed outside the check, while
    .github/workflows/ — the one .github/ path the gate does police — was already clean.
  • Observable before → after, with the validation row that proves it: before, three of these
    edits all passed the owning smoke: reverting the prefix to .github/workflows/, dropping
    .github/ from it entirely while keeping the text fixes, and deleting the
    GOVERNANCE.md exception. After: each fails with its own named assertion (see
    regression_parity), and the smoke passes only with the widened prefix and the
    repointed files, which is the pair this PR delivers.
  • Issue/task and intended base: Closes [Task]: GitHub's own rendered pages are outside the live-surface hygiene check #4953 (filed from this same measurement). Base is
    current main. No file under loopx/ changes, so no runtime behavior changes.

Scope And Continuation

  • Completed scope and remaining work: .github/ is now live by location, the eighteen
    runtime-facing address uses in those six files name the canonical repository, and the two
    GOVERNANCE.md uses that name a historical event (where the project started, and which
    issue settled a roster change) are recorded as reviewed path+use exceptions rather than
    silently kept. Deliberately not folded in, because both need an owner judgment about
    whether a sentence is history rather than a pointer: the published prose under
    apps/presentation/site/public/blog/** and apps/presentation/site/public/benchmarks/deepswe-sol/
    (mixing live pointers with dated citations), and the tracked build output
    loopx/web/chat/assets/index-<hash>.js that [Queue] 19 个 open PR 与 main 冲突:其中 7 个只卡在两组 append-only RFC ledger,3 个卡在已提交的前端 bundle #4677 already names as the structural cost.
  • Slice boundary / successor: the .github/ surface is complete within this scope. The
    apps/ residue is a separate decision and should not be smuggled into a prefix change;
    it is named above so a successor can be filed against it directly.

Validation

  • Tested revision: 408902537
  • Run state: finished
  • Input classes: none (this diff contains no runtime data; the checks read repository files)
Check kind Result Public-safe evidence / limitation
real_entrypoint passed python3 examples/repository-hygiene-smoke.pyrepository-hygiene-smoke ok on the widened prefix with all six files repointed. This is the check that owns the rule being widened, and it is the check a future stale link under .github/ will fail.
regression_parity passed Three mutations of the check itself, one at a time, each producing a distinct failure and each reverted before the final run: (1) prefix back to .github/workflows/AssertionError: GitHub renders ISSUE_TEMPLATE/config.yml as the contact links on its own new-issue page, so it is a live surface; (2) drop .github/ from the prefix while keeping the file edits → same classifier assertion, which shows the gate and not the text is what enforces this; (3) delete the GOVERNANCE.md exception → live surfaces must name the canonical loopx-project/loopx; ... still appears in: ['.github/GOVERNANCE.md (commit, issue)'], which shows the exception is load-bearing and that widening coverage did not loosen the rule. Reverting all three → smoke ok.
static passed python -m ruff check and py_compile clean on the changed Python file; git diff --check clean across all seven paths; loopx check --scan-path over every touched path → ok: true, errors=0, warnings=2.
static failed (pre-existing on the base, not caused here) python3 examples/docs-governance-smoke.py fails with AssertionError: automatic-execution-admission-v0.md. Reproduced identically on an unmodified checkout of main at the same revision, so it is a release/governance record owned by the maintainers and is disclosed rather than fixed in this PR. It is the same class of residue #4776 disclosed for validate_release_timeline.
unit not_run No tests/ module exercises these paths; the rule lives in the smoke above. CI runs the full suite on the merge ref regardless.
  • Coverage and gaps: the changed paths are one check script plus six .github/ files, and
    the checks above are the ones that read them. Not covered here and not changed: the
    apps/ prose named in the scope section, and the docs-governance-smoke failure, which
    reproduces on the base.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A — no LoopX surface (dashboard, site, desktop, docs chrome) is changed. The
    edited files are Markdown/YAML consumed by GitHub; the address text before this PR is
    observable on the public new-issue page of the repository and in the raw files at main.
  • After: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A — no layout or information hierarchy changed.

Type of Change

  • Bug fix (the hygiene gate did not cover the surfaces it was meant to cover)
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: Operator surface and public-boundary
    hygiene. No roadmap id claimed.

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal: N/A — no promotion, runtime-routing
    or compatibility projection changes.

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

`LIVE_SURFACE_PREFIXES` guarded `.github/workflows/` alone, so the files GitHub
renders at a visitor or a reporter escaped the canonical-repository check
entirely: the private-vulnerability entry in `SECURITY.md`, the four contact
links in `ISSUE_TEMPLATE/config.yml` that GitHub prints on its own new-issue
page, `SUPPORT.md`'s routing table, the PR template's guidance pointer, and the
ruleset link `GOVERNANCE.md` itself calls live. Seventeen addresses named the
pre-transfer owner, and they kept resolving only because the transfer left a
redirect behind -- which is a courtesy, not an ownership fact.

Point each of those at `loopx-project/loopx`. Governance's record of the initial
public commit and of the issue that settled a roster entry keeps the address
those events happened under, reviewed per path and use like the existing pull
citations; the ruleset link does not, because the sentence around it calls it
live.

Only the widened prefix decides this, not a new rule: every classified use is an
offender until a path-and-use exception reviews it, so the two citations had to
be judged rather than inherited. The smoke now pins both directions -- the
new-issue contact file is a live surface, and a dated commit citation under it
stays tolerated.

`LIVE_ADDRESS_USES` is removed: nothing referenced it, while its comment
described a live-versus-citation split the implementation never applied, which
is the easiest thing in this file to "fix" by editing a constant that does
nothing.

Signed-off-by: Yue Dai <54579099+yuedai-pbc@users.noreply.github.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

动机

#4953 指出仓库迁移后,GitHub 直接展示给提问者、漏洞报告者和贡献者的 .github/ 文件仍使用旧 owner 链接,而原有 hygiene smoke 只扫描 .github/workflows/。在基线 eb16c5443 上,ISSUE_TEMPLATE/config.yml 不属于 live surface、仓库 smoke 仍通过;把它纳入检查并修正公开入口是有价值的目标。不过本 head 尚未完整达到“仅豁免经审查的历史引用”。

改动思路

沿用现有 examples/repository-hygiene-smoke.py 的 tracked-file 扫描、路径分类和旧地址识别,扩大 .github/ 的 live-surface 前缀,并在同一例外表里保留治理文档中的两条历史记录。这比另建一套 GitHub 链接检查更合适;判定权仍在原有 smoke。正向路径已成立:新的 contact/security/support 等入口指向 loopx-project/loopx,未来常规旧地址会触发 smoke。

具体改动

六份 GitHub 展示文件更新了安全私报、提问、支持、发布、规则集和贡献指引等 URL;GOVERNANCE.md 的历史 commit 与 issue 链接保留。smoke 扩大扫描范围,移除未使用的 LIVE_ADDRESS_USES,补了 rendered contact file 与历史 commit 的断言。

关键代码讲解

  • LIVE_SURFACE_PREFIXES:从 .github/workflows/ 扩到全部 .github/,使 GitHub 新建 issue 页展示的 config.yml 进入实际扫描。
  • REVIEWED_ADDRESS_EXCEPTIONS:新增 GOVERNANCE.md -> {commit, issue};这里按文件和 URL 类别而非两条已审查引用的身份放行。
  • stale_address_uses:逐个识别旧地址后仅按类别过滤。它与上述新例外组合时,无法区分历史 #4069 和后来新增的其他旧仓库 issue。

对主干的风险

[P1] 新例外过宽,会让新增的旧 owner 链接绕过刚扩大的护栏。用相同的合成输入在基线和 head 调用真实分类器:对 GOVERNANCE.md 中一个历史例外的编号 issue 链接,基线返回 ['issue'],此 head 返回 [];换成另一个 commit ID 也返回 []。因此完整的 repository hygiene smoke 通过,仍不能证明该文件只豁免了那两条历史引用。请把例外限制到确切的历史 URL/ID(或等效的单条引用身份),并增加“另一编号 issue/commit 必须报错”的反例测试;重跑 uv run --extra test python examples/repository-hygiene-smoke.py

语义与 CI 对齐

这里影响的是当前生效的 public-link hygiene 规则,不是未来 RFC 建议;复用了正确的规则 owner,但例外粒度违反“只容忍已审查引用”的语义。基线和 head 的 repository hygiene smoke 都通过,head 的 Ruff 与 diff-check 通过。另一个 docs-governance-smoke.py 在两者都因同一份 RFC 镜像断言失败,属于已确认的基线问题,不归因于本 PR;按当前 Goal 配置未轮询远端 CI。

我的整体评价

修正六份公开文件及扩大扫描范围的方向和规模都合理,且无需额外运行时抽象;阻塞点集中在新增例外,而不是全 PR 的方向。修到精确历史引用并证明无关旧地址仍被发现后,可按同一 exact head 重新评审。当前结论:请求修改。

English verdict: REQUEST_CHANGES - head 4089025; narrow the GOVERNANCE.md historical exceptions so unrelated old-owner numbered issue/commit links cannot pass the live-surface guard. Base/head smoke and synthetic classifier probes were run; the governance smoke has the same unrelated baseline failure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: GitHub's own rendered pages are outside the live-surface hygiene check

2 participants