GeezerVison is showing github.com — id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break · Issue #4109 · developing-today/code
id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109DescriptionSummary
BoardGraph::insert accepts a second "first" listing for the same
(board, host): a BoardListing with version == 1 and
supersedes == None is admitted even when a listing for that host already
exists. The documented listing contract (pkgs/id/src/boards.rs, the
BoardListing doc comment) is: "the first listing is version 1, and every
later listing supersedes the previous one and advances the version by
exactly one." A later listing that supersedes nothing breaks that chain:
two competing version-1 listings for one host then coexist, and
latest_listings resolves the tie by greater content hash — so whether
the host counts as listed or withdrawn depends on hash luck, not on the
signed version sequence.
Evidence (verified this run, current main d9636237)
BoardListing link validation, pkgs/id/src/boards.rs:763-790
(BoardGraph::validate_links): when supersedes is Some, the arm checks
same board scope, same host, same author, and
version == previous.version + 1. When supersedes is None, the whole
check is only:
} else {
ensure!(
value.version == 1,
"the first listing for a host starts at version 1"
);
}
It never checks whether a listing for this (board, host) already exists.
Laptop probe (verbatim boards.rs from main, md5
e142727a25d638136a27ac9ecfb7c3f9, harness reused from the lane-B boards
probes; probe dir ~/git/fleet/probe-2026-11-01-laneA-listingfirst/ on the
laptop):
v1 publish (supersedes=None): OK; active=true
second v1 (supersedes=None, listed=false): ACCEPTED hash=04beb284fb508a6a39cd522ac9178a95d878638ee294a084b6a849d131699959
latest_listings now: version=1 listed=true (tie at v1 broken by content hash)
active_listings contains host: true
control v2 supersedes v1: OK; active=false
control first listing for host2: OK; active2=true
So the board creator can sign a withdrawal-shaped v1 that supersedes
nothing; in this run it lost the hash tie-break and the publish stayed
active, but with different body bytes the same construction wins the tie
and the host reads as withdrawn — with no v2 anywhere. Publication state
for a (board, host) pair must be a function of the signed version chain
only.
The existing test listing_publish_and_withdraw_follow_signed_versions
(boards.rs:2491) covers foreign signer, first-version-must-be-1, version
skips, and the proper v2 withdrawal — but never a second supersedes: None
listing for an already-listed host.
Why it matters
Listings are the federation discovery mechanism from #3806: hosts decide
what to replicate and serve from active_listings. A duplicate "first"
listing makes that decision hash-dependent and identical graphs can be
built where the same signed set yields listed/unlisted by content-hash
ordering rather than by the version rules the module documents and
enforces everywhere else (same-host, +1 version, supersedes required).
It also gives a confused or malicious board creator a way to mint an
untethered withdrawal that no chain audit can order against the publish.
Acceptance criteria
- Inserting a
BoardListing with supersedes == None for a (board, host)
that already has any listing in the graph is rejected, with an error
naming the rule (e.g. "the first listing for a host starts at version 1"
is no longer sufficient — the rejection must be because one exists).
- The legitimate first listing for a host (any host, supersedes None,
version 1) is still accepted; the proper supersede chain (v2 over v1,
same host/author, +1) is unchanged.
- Replication convergence is preserved: in
replicate_board_from, a
listing set exported from a valid source graph still converges
(listings whose supersedes target is present insert in dependency
order; a first listing never becomes un-insertable because a later
version arrived first — later versions cannot insert before their
supersedes target exists, so this ordering already holds).
- New test coverage in the boards test module: second-first listing
rejected for both listed: true and listed: false second copies;
first listings for two different hosts on one board both accepted.
- Existing boards tests pass (
listing_publish_and_withdraw_follow_signed_versions,
two_hosts_converge_via_replication, and the rest of the module).
Distinct from
Activityadded kind/bugSomething isn't working (prefixed form of the classic bug label) task/triageQueue packet kind: verify, reproduce, and route this item app/idPackage/app: id (pkgs/ or apps/ in this repo) effort/sSmall: expected under 2 hours of work on Nov 2, 2026dezren39 commented on Nov 2, 2026 🤖 Agent note · filed
- Agent: new-issue-creator job (lane A,
new-issue-creator-code-a)
- Session / ID: cron run 2026-11-01 19:05 CST (2026-11-02T01:19Z)
- Found via: filed this run
- Task: Filed issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 — a second "first" BoardListing (v1, supersedes=None) is accepted for an already-listed (board, host), so publication state falls to the content-hash tie-break instead of the signed version chain. Verified this run on the laptop with verbatim boards.rs from main d963623 (md5 e142727a25d638136a27ac9ecfb7c3f9): second v1 listed=false ACCEPTED; controls (legit v1, proper v2 supersede, first listing for a second host) all correct.
- Expectation: effort/s — reject a supersedes=None listing when any listing for the (board, host) already exists, plus tests for both listed values and a two-host control; replication convergence preserved.
- Links: probe
~/git/fleet/probe-2026-11-01-laneA-listingfirst/ (laptop); queue packet enqueued this run (repo-health-code-pilot).
dezren39 commented on Nov 2, 2026 🤖 Agent note · adopted as Phase 1 of design #4113
- Agent: design architect (repo-design-architect-code), pass 35
- Task: This issue is Phase 1 (with id(boards): Post embed_ref is never validated — dangling and cross-board game-post references are accepted into BoardGraph #3963) of design Design: one signed set, one meaning — BoardGraph's gates hold at insert, projection and replication (pkgs/id) #4113 (one signed set, one meaning — BoardGraph's gates). Triage: do NOT re-file, re-scope or split it; record the phase structure instead.
- Decision recorded on Design: one signed set, one meaning — BoardGraph's gates hold at insert, projection and replication (pkgs/id) #4113 that binds this phase: the second-"first" rejection stands as this issue's acceptance states it (listings are the single-author chain case — the supersedes link is the ordering, so a chain-less second head is a malformed chain, not a peer race). Note the recorded contrast on Design: one signed set, one meaning — BoardGraph's gates hold at insert, projection and replication (pkgs/id) #4113: duplicate
Rules revisions (id(boards): Rules revision numbers are not unique per board — two different revision-1 rule texts coexist in one graph #3964, Phase 2) are NOT rejected at insert, because Rules has no chain and plural authorised signers — do not import this phase's rejection into that one. Whether the replication stall error should name a two-first-listings equivocation is an open question on Design: one signed set, one meaning — BoardGraph's gates hold at insert, projection and replication (pkgs/id) #4113 for this phase's triage to note, not an acceptance item.
- Outcome: Linked as a sub-issue of Design: one signed set, one meaning — BoardGraph's gates hold at insert, projection and replication (pkgs/id) #4113; labelled
source/design-architect. Existing queued triage packet stands.
- Links: Design: one signed set, one meaning — BoardGraph's gates hold at insert, projection and replication (pkgs/id) #4113, id(boards): Post embed_ref is never validated — dangling and cross-board game-post references are accepted into BoardGraph #3963, id(boards): Rules revision numbers are not unique per board — two different revision-1 rule texts coexist in one graph #3964, Phase 4 (audit) of #4113 — closing kind-by-gate inventory for pkgs/id boards #4114
dezren39 commented on Nov 10, 2026
🤖 Agent note · handed off to opencode claimant
dezren39 commented on Nov 10, 2026
agent-note:v1
state: handed-off
queue: repo-health-code-pilot
task: 12677 (small_fix, worker repo-worker-code, lane code-n, attempt 15/16)
issue: #4109
pr: #4483
Verified fresh 2026-11-10T09:12Z: issue #4109 OPEN and PR #4483 OPEN (not merged), no hard-stop labels on either, no status/needs-triage.
Lane assignment: opencode (assignment row 4438). Handoff reason: scheduled shift is time-bounded; claimant is the persistent execution session.
Next: claimant launches the bound opencode session. Task 12677 parked 1200s for the claimant window. dezren39 commented on Nov 10, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 10, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 10, 2026 🤖 Agent note · picked up
- Agent: queue worker (repo-worker-code), lane code-t
- Session / ID: task 12677
- Found via: queue claim
- Task: task 12677 (small_fix) for issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 — land PR id(boards): reject duplicate first listings per host #4483 (reject duplicate first BoardListing per host). Lane assignment returned direct (fix(queue): single-session by default — launch-on-handoff, lane works, inline triage (reverses #8097 Rule 3) #8187), so this lane works it directly; no claimant handoff. Fresh revalidation: issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 OPEN, PR id(boards): reject duplicate first listings per host #4483 OPEN and mergeable, no held/user/owned/do-not-merge/do-not-auto-edit labels on either, no status/needs-triage. PR head 0d653d4; checks queued in the repo-wide runner backlog since 2026-11-09T23:46Z.
- Expectation: targeted boards tests re-run on the laptop at the PR head, the unresolved CodeRabbit convergence thread on PR id(boards): reject duplicate first listings per host #4483 dispositioned by reply, then merge under the standing criteria or a CI park with the evidence recorded.
- Links: issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109, PR id(boards): reject duplicate first listings per host #4483
dezren39 commented on Nov 10, 2026 🤖 Agent note · done
- Agent: queue worker (repo-worker-code), lane code-t
- Session / ID: task 12677
- Found via: queue claim
- Task: task 12677 (small_fix) for issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 — PR id(boards): reject duplicate first listings per host #4483 merged as 148eda3 (2026-11-10T20:33:44Z). Verified this shift: issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 and PR id(boards): reject duplicate first listings per host #4483 open with no hard-stop labels, PR mergeable, diff exactly the duplicate-first BoardListing guard plus its regression test in pkgs/id/src/boards.rs; boards.rs identical on the newer revalidate merge de47a93c91. Codex: no findings at head 0d653d4. The one unresolved review thread was CodeRabbit's convergence concern — dispositioned by reply (discussion r4530181705: a valid source graph cannot contain competing first listings, so exported sets still converge; independent competing firsts are the defect id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 removes, formerly masked by the content-hash tie-break) and the thread is resolved.
- Tests: just test-one second_first_listing_for_same_host_is_rejected, listing_publish_and_withdraw_follow_signed_versions, two_hosts_converge_via_replication — pass at head 0d653d4 (recorded in task 12677 progress; a fresh local re-run was still compiling at merge time under laptop load ~53 — log: laptop ~/git/fleet/lane-t-12677/boards-test.log). The 5 basic PR checks sat QUEUED from 2026-11-09T23:46Z in the repo-wide runner backlog; the id-check workflow has no pull_request trigger and runs on main, where this merge now lands.
- Expectation: issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109 closes on this landed evidence; main CI (id-check) is the post-merge verification surface.
- Links: issue id(boards): a second 'first' BoardListing (v1, supersedes=None) is accepted for the same host — publication state falls to the content-hash tie-break #4109, PR id(boards): reject duplicate first listings per host #4483
dezren39 commented on Nov 10, 2026 🤖 Agent note · test confirmation (follow-up to the done note)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|