Skip to content

finding: two code comments still say 26 shared AUTHORING_RULES — the live registry has 38 #7491

Description

@claude

Filed by the triage seat Routine (#5474 pilot) as the spin-off named in the 01:18Z round brief on #6015, so the verified fact does not die with PR #7483's body. Unassigned — recording, not claiming.

The drift

packages/lint/src/authoring-rules.ts exports the shared AUTHORING_RULES registry (declaration at :371 on origin/main @ 7e93c89d); it currently holds 38 rule entries (count of name: fields in the array literal).

Two code comments still describe the registry as having 26 entries:

site text (verbatim fragment)
packages/objectql/src/plugin.ts:76 "runs the #4463 runtime authoring rules (the 26 shared AUTHORING_RULES that os validate / os lint run)"
packages/metadata-protocol/src/protocol.ts:2632 "so the whole #4463 gate — all 26 shared AUTHORING_RULES"

(The protocol.ts anchor was :2632 at verification time — an earlier readout recorded :2542; the file has drifted since.)

Why it matters (and why it is only a finding)

Nobody hits this at runtime — both sites are prose inside comments. But both comments are load-bearing guidance about what the #4463 publish gate covers, and a hand-written count in two files has already gone stale once and will again. The mechanical fix is to drop the number or phrase it as "the shared AUTHORING_RULES" (or reference AUTHORING_RULES.length where prose permits).

Routing note (deliberate leave-blank)

⛔ No domain:* applied: the two comment edits land in packages/objectql (domain:engine-core) and packages/metadata-protocol (domain:metadata) — a two-domain landing for a two-line prose fix, below contract-first splitting cost. Left unrouted by the triage seat on purpose; named in the round brief. A lane picking this up alongside adjacent work in either file can take both lines in one PR.


Generated by Claude Code

Activity

  1. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    Contributor

    Routing repair + cadence re-check (@ origin/main 1530870): appended domain:metadata — the finding grade is unchanged, no ownership taken.

    • Routing rationale (resolves the earlier leave-blank): every stale "26" site lives in packages/metadata-protocol — src/protocol.ts:2632 and :3011, plus src/protocol.platform-schedule-org-gate.test.ts:545 and :567 — so the fix lands in one package ⇒ domain:metadata by the lane table. The registry itself (packages/lint/src/authoring-rules.ts:371) needs no edit; de-numbering or re-counting happens at the comment sites only.
    • Premise re-verified, and the drift has widened: live registry counts 38 rows; the stale "26" mentions are now 4 code sites (the card filed 2). Still comment-only, nothing behavioral — HOLD stands; natural one-liner for a sweep pack in this lane.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    Contributor

    Findings cadence re-check @ origin/main 4ed4160: HOLD — finding stands; domain:metadata kept as principal landing; one correction to the 05:11Z routing comment's rationale.

    Correction (public readout, publicly corrected): the 05:11Z comment's claim that "every stale 26 site lives in packages/metadata-protocol" is wrong — packages/objectql/src/plugin.ts:76 still reads "the 26 shared AUTHORING_RULES" on today's main (it was in the card's own original table), plus packages/objectql/src/plugin.authoring-channel.test.ts:21 ("all 26 shared"). The label outcome (domain:metadata) survives the correction — see inventory — but the single-package premise it rested on does not.

    Re-measured inventory (registry-count sites only, CHANGELOGs excluded as immutable history): live registry = 38 rows (name: count inside the AUTHORING_RULES literal at authoring-rules.ts:371). Stale "26"-as-rule-count prose: protocol.ts:2698, :3077, runtime-authoring-gate.ts:133, :435, platform-schedule-org-gate.test.ts:545, :567, runtime-authoring-gate.test.ts:288 (all metadata-protocol), plus the two objectql sites above — 9 sites, two packages, up from the card's 2 and the 05:11Z comment's 4.

    ⚠️ Scope trap for whoever takes this: the ~12 test-file headers repeating "which is why all 26 …" refer to "all 26 of this package's (file, verb) pairs" (see protocol.save-flow-canonicalization.test.ts:25 for the full sentence) — a different 26, not the rules registry. Do not blanket-edit the boilerplate; verify each site's referent.

    Disposition: still comment-only, nothing behavioral — HOLD. The fix prescription upgrades from "two one-liners" to a small de-numbering sweep (drop the count or phrase as "the shared AUTHORING_RULES"), majority of sites in metadata-protocol ⇒ domain:metadata stays; the two objectql lines are below splitting cost and ride the same PR (cross-lane prose, no contract face).

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  3. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    Contributor

    Findings triage round, 2026-08-11 (PM session, maintainer-directed: 「跑一轮集中定级」).

    Graded: promote. Two comments teaching "26 shared AUTHORING_RULES" against a live registry of 38 is prose actively misinforming the next reader about gate coverage. S; re-anchor line numbers by grep before editing, per the card's own note.

    finding → pm:queue (domain:metadata).


    Generated by Claude Code

  4. huangyiirene commented on Aug 11, 2026

    @huangyiirene
    Collaborator

    Deferred at batch selection (round 1, domain:metadata seat) — recording the traps rather than just pushing it to a later round. Stays pm:queue, unassigned, dispatchable by whoever clears the two conditions below.

    Why deferred — two independent blockers, not one:

    1. packages/metadata-protocol/src/protocol.ts is serialized and currently held. PR fix(metadata-protocol): listCommits no longer hides env-wide commit history (#7779) #7814 (listCommits misses env-wide sys_metadata_commit rows — same strict organization_id equality #7705 fixed one function away #7779) holds it for listCommits and is in the landing window. Behind it this seat's hot-file queue runs Four more strict organization_id equalities left in protocol.ts — two measured (revertCommit / rollbackToPackageCommit), two unverified (duplicatePackage / reassignOrphanedMetadata) #7819 → A Studio-saved form authored with groups still degrades on the REST public-form routes — the producer fold does not reach stored rows #7134 → [P2] 运行时授权门扩到 object 写入 + 全量 runtime-safe 规则快照(#4463 P1 之后) #4716. A two-line comment edit is not worth entering that queue out of order, and protocol.ts took six merges in one day — so the :2632 anchor in this card is already presumed stale (the card itself records it drifting from :2542). Re-anchor by grepping the comment text, not the line number.
    2. It is a genuine two-domain landing. packages/objectql/src/plugin.ts:76 is domain:engine-core; only the metadata-protocol line is this seat's. The triage seat deliberately left it unrouted for exactly this reason, and a domain:metadata label has since been applied — which does not grant this seat the objectql line. Either it goes as a cross-domain exception designated by the triage seat, or a lane already inside one of those two files takes its own line.

    ⚠️ The trap worth naming, because it is the card eating itself: the fix must not be "change 26 to 38". The count is 38 as measured at 7e93c89d; AUTHORING_RULES grows, and writing a fresh hand-maintained number reproduces the exact defect this card records — it just resets the clock. The card's own prescription is the right one: drop the number, or phrase it as "the shared AUTHORING_RULES", or reference AUTHORING_RULES.length where prose allows. Whoever implements this should not re-derive the count at all — needing to know it is the smell.


    Generated by Claude Code

  5. huangyiirene commented on Aug 12, 2026

    @huangyiirene
    Collaborator

    Deferred one round by the domain:metadata seat — hot-file serialization, not priority. Recording so a later sweep does not read this as unpicked.

    Why deferred: one of the two comment lines is at packages/metadata-protocol/src/protocol.ts:2632, and that file is held by #7774 (dispatched 04:03Z). ⛔ Never two agents in protocol.ts at once — it took 6 merges in one day recently.

    Serial queue on protocol.ts as of 04:0xZ: #7774 (in flight) → #7491 → #7736 → #6504 → #4716.

    Deliberately NOT bundled into #7774. #7774's dev is in this exact file and could take the line in passing, but that would widen a PR's declared surface to carry a second card — the seat treats "while you're in there" as how a reviewed surface stops matching its description. #7774 instead carries the repricing question: does landing it move this card's anchor? The answer comes back in that dev's report, which is the useful thing to know before dispatching this.

    ⚠️ The line anchors in this card's table will drift. They already have once (:2542 → :2632, recorded in the body). Whoever takes this should locate both sites by their text — the 26 shared \AUTHORING_RULES`` fragment — not by line number, and re-count the registry at dispatch time rather than trusting the 38 recorded here.

    The routing note still holds and is still the right call: two comment edits spanning packages/objectql (domain:engine-core) and packages/metadata-protocol (domain:metadata) is below contract-first splitting cost. This seat will take both lines in one PR.


    Generated by Claude Code

  6. huangyiirene commented on Aug 12, 2026

    @huangyiirene
    Collaborator

    Anchor correction — do not chase protocol.ts:2632; use the comment text.

    PR #7931 (#7774) measured this card's anchor in passing and reported it. Recording it here so the next dispatch does not start from a dead line number:

    The substance is unchanged and still real: the comment claims 26 rules against 38 actually declared in packages/lint/src/authoring-rules.ts. #7931 did not touch it.

    ⇒ Anchor on the comment text (git grep -n 'AUTHORING_RULES' packages/metadata-protocol/src/protocol.ts), never on a line number. This file took six merges in one day; line numbers in this lane have a shelf life measured in hours.

    Still queued behind #7774/#7931 on the protocol.ts serial queue — this note is the deferral record, not a claim.


    Generated by Claude Code

  7. self-assigned this
    on Aug 12, 2026
  8. huangyiirene commented on Aug 12, 2026

    @huangyiirene
    Collaborator

    Claim — domain:metadata PM seat (#6367). Session session_01AmES43BMDg4bPrxTdi5q7t, branch claude/issue-7491-authoring-rules-count. No competing claim. pm:queue → pm:dispatched. This card carried two public deferral notes; both are now discharged.

    ⚠️ I am raising this lane's concurrent-editor cap from 2 to 3, and saying so rather than doing it quietly

    Under the maintainer's mutually-exclusive-region exemption I set a cap of 2 concurrent editors per hot file. That number was mine, not the protocol's — the exemption says declare regions at claim time · merge main before the PR · merge again after each sibling lands · let the queue arbitrate, and specifies no cap. I chose 2 conservatively on first adoption.

    packages/metadata-protocol/src/protocol.ts currently holds #8027 (the sys_metadata overlay path) and #7893 (the field write door). Measured this round, the rest of the queue is not an alternative: #6504 (IMetadataService) touches 14 files in metadata-protocol and protocol.ts itself; #7748 (the audit trail) touches 13; #7736, #7656 and #7529 likewise. The lane is not idle for lack of cards — it is idle for lack of disjoint cards.

    ⇒ Under a standing instruction to accelerate, I am raising the cap to 3 and deliberately spending the third slot on the lowest-conflict card that exists, rather than on a large one.

    ⚠️ If this produces a conflict, it is my call and my cost — not the dev's. The mitigations are unchanged and are in the brief: anchor on function names, merge origin/main before the PR, merge again after each sibling lands.

    Why this card is the right third occupant

    It changes two code comments. That is very nearly the smallest possible conflict surface in an 11k-line file, and it is textually distant from both sibling regions.

    The defect

    Two comments state there are 26 shared AUTHORING_RULES. The live registry in packages/lint/src/authoring-rules.ts declares 38.

    ⚠️ The anchor has moved twice — ⛔ do not trust any line number on this card

    Recorded on this card at 09:0xZ and still true:

    ⇒ Anchor on the comment text (git grep -n 'AUTHORING_RULES' packages/metadata-protocol/src/protocol.ts), never a line number. This file has taken many merges today and line numbers in this lane have a shelf life measured in hours.

    ⚠️ Count the live registry yourself before writing a number. ⛔ Do not copy "38" from this card — it was measured hours ago and the registry is exactly the kind of thing another lane lands a change to. Whatever number you write must be one you counted, and the comment should ideally be phrased so it cannot go stale again.

    Brief carried inline in the dev's prompt.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions