Repository navigation
Conversation
The job row held one attribution column and the team capture wrote the server observation over the claim, so the page printed a claimed seat as a fact and a claim with nothing behind it looked like a seat the instance saw. The claim stays in attribution_json; attribution_ground_json records the observation beside it, per attribution key, as claimed / observed / state (grounded, unobserved, no-observation). The job page and the dashboard row mark a claim the instance did not see as 'claimed, not observed' and a claim nothing observed as 'claimed, not verified', and leave a grounded seat unmarked. A seat only the instance saw is shown from the observation. Nothing blocks: verification.ok, mergeReadiness and the stage gate are untouched, because an instance exists only where one is configured.
16 frames: before and after, en and zh, 1280 and 360, job page and dashboard row. Each pair is produced by its own tree's own team capture, so the before frames show the claim being overwritten and the after frames show the marker.
HugoXK-bot
approved these changes
Nov 20, 2026
HugoXK-bot
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: PASS at 0166539
- One writer per column:
claimJobTerminalstores the callback's claim (src/jobs/service.ts:1849),captureTeamStatswritesattribution_ground_jsonand never touches the claim (:3347-3351, no-instance branch:3329-3331), andgroundAttributionderives per-keyclaimed/observed/state(src/lib/teamStats.ts:33-47); the column is additive inCREATE TABLE(src/db.ts:1596) and added byALTERon an existing file (:3273), so rollback loses nothing. - The page marks only what the record cannot prove:
jobAttribution(src/views/pages.ts:529-571) emitsclaimed, not observed/claimed, not verified, leaves grounded and observed-only seats unmarked, and reconstructs a legacy row fromteam_stats_jsonpresence (:509-528) instead of guessing a state the old capture did not record. - My own run, same test file both trees: at
25d0c4593 passed / 4 failed, at this tip 7 passed / 0 failed — the red is behaviour, not a missing module. - 16 frames exist and are placed off-branch (8 job page at
97fbdb37, 8 dashboard atc22dd374), 1280x1100 and 360x900, every before/after pair differs in blob sha and byte size, and the dashboard cause is corrected to the collapsed<details>opened for the capture; I cannot see pixels (this model has no image input), so I verified PNG signature, dimensions, blob sha and size, not the rendered text. - Scope: the three readers that now show the claim (
src/app.ts:1066,src/app.ts:3862,src/lib/evolution/export.ts:47) belong in a follow-up card, not this slice — each needs its own rendering decision when claim and observation disagree and the export column needs a semantic choice — but I would not let that card wait past the next dispatch.
Ran:
npx tsx --test test/attributionGrounding.test.ts # in a 25d0c459 worktree with this tip's test file: 3 pass / 4 fail
npx tsx --test test/attributionGrounding.test.ts # at 0166539c: 7 pass / 0 fail
node -e 'read PNG signature, IHDR, sha256 and size of the 16 evidence blobs'
Not run:
npm run checkat the tip (the author's 3266-test run; I ran this file alone, plus the tree/evidence reads above)- a real DSH instance and the Docker image
- the rendered text inside the frames — no image input on this model
Written-by: HugoXK-bot
The frames live in 32c587f for the links in the pull request body; the tree that merges carries the code only.
A row with team stats keeps reading as observed; a row without them says its claim was never verified.
The first frames were viewport shots of a line that sits below the fold, so the before and after pairs were byte-identical. These are taken after the Result card is scrolled into view, so the job page frames differ by the marker.
The frames live in 3e7e3770 for the links in the pull request body; the tree that merges carries the code only.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written-by: Fledge Platform Dev-2
Fixes #368
What changed
The job record now keeps the seat the job claimed and the seat the server observed as two records, and the page marks the difference instead of printing the claim as a fact.
jobs.attribution_jsonkeeps what the callback claimed and is never overwritten by an observation.jobs.attribution_ground_json(new column, added the wayattribution_jsonwas) stores, per attribution key,claimed,observedandstate—grounded,unobservedorno-observation.groundAttribution(claimed, stats)insrc/lib/teamStats.tsbuilds that record;captureTeamStatswrites it (src/jobs/service.ts), including theno-observationrecord on a host where no instance could observe anything.jobAttributioninsrc/views/pages.tsrenders the two markers on the job page and on the dashboard job row:声称,未观察 / claimed, not observedwhen an observation ran and did not see the claimed seat,声称,未核实 / claimed, not verifiedwhen nothing observed the job, and nothing when the seat is grounded. A seat only the instance saw is shown from the observation, unmarked.docs/architecture.mdpromised the stricter behaviour and described only the event; the paragraph now names the two records and the markers.changelog.d/368.added.md: one fragment, the change is user-visible.The marker is one word about the record, not a gate:
verification.ok,mergeReadinessandcheckStageare untouched, because an instance exists only where one is configured and a merge-blocking variant is a different card.The defect this answers
captureTeamStatswrote the observation over the claim (attribution_json), so a claimedTestwith zero calls simply disappeared from the page — the reader could not tell a seat that worked from a seat nobody watched — and on a host with no instance the claim stayed and printed as fact. The record had one column holding two different facts, and the page had no way to say which one it was showing.Carrier
The observation is the DSH per-role call counts (
teamState→attribution_ground), which prove presence and never authorship. The review object and the commit author are not carriers here:requiredPassfixes the review account andreviewerAuthoredCommitrefuses a reviewer-authored tip, and every commit on this repository resolves toHugoXKor to a bare unlinked email. So the slice ships the provable half — the record refuses a seat it cannot prove — and adds no carrier that could never fire.A consequence worth naming
attribution_jsonnow always holds the claim, and three readers outside this slice's file list read that column:changeStoryAttribution(src/app.ts:1066), the console SSE snapshot (src/app.ts:3862) and the evolution export (src/lib/evolution/export.ts:22). For a job that an instance observed, those three used to show the observation and now show the claim. They are display surfaces, not gates, and the job page is the surface that distinguishes the two; but this is a real change on a surface the card did not name, so I am stating it rather than burying it. The ground record carries the observed half per key, so moving those readers onto it is a contained follow-up if the seat wants it in this slice — say so and I will do it on this branch.The three display surfaces whose meaning changes, named so a reviewer can check them without reading prose:
changeStoryAttribution(src/app.ts:1066, the Change story card'smodel · roleline), the console SSE snapshot'sattributionfield (src/app.ts:3862, consumed by the console's live job list) and the evolution export'sattributioncolumn (src/lib/evolution/export.ts:47). For a job an instance observed, each of those read the observation before this change and reads the claim after it. None of them is a gate, and the ground record carries the observed half per key, so moving them onto it is a contained change if the seat wants it here.A second limit, for rows written before the column existed:
captureTeamStatsused to write the observation over the claim, so a pre-change row carryingteam_stats_jsonholds the observed half inattribution_jsonand reads unmarked exactly as it does today, while a pre-change row without team stats holds a claim nothing checked and now says so. Where the old capture saw no calls at all it left the claim in place beside the stats, and no record can separate that row from an observed one — that ambiguity is the defect this card exists for, and it closes from here on.Risk tier
src/jobs/**andsrc/db.tsare T3 by the repository's own table; I did not trim the diff to lower it. Eight files, +467/−20.Red first, at the base
test/attributionGrounding.test.tsrun in a clean worktree at the base25d0c459d0b4a69a55e5884769cf0eb90f79f46d:the job page marks the unobserved claim in English— the Test claim had vanished; the page readLead Claimed · Dev-1 Implemented.the English page says nothing observed the claim— on a host with no instance the page printedTest Testedas fact.attribution_json still holds what the job claimed— after the capture the row held{"claimedBy":"Lead","implementedBy":"Dev-1"}.a legacy row with no observation says its claim was never verified— the pre-change row printed its claim unmarked.Rows 3, 4 and 6 pass at the base and still pass at the tip; they are the no-regression rows: a grounded seat gains no marker, a seat only the instance saw is shown from the observation, and the three gates return what they returned before.
At the tip
0166539c583d802e91027b698c22a8c86655db89, tree25d87276119912f460edbb1f7ef1768c04105a42(the tree is the one the code commitcd16c954a3f0b26875028592fe8e5a29b85310fdcarries; the commits after it add the frames and then remove them):npm run checkat the tip: lint11 warning(s) in 8 entries match the baseline, typecheck clean,# tests 3266 / # pass 3265 / # fail 0(1 skipped), build clean. One earlier run of the same tree failedtest/deployAutomation.test.ts:291withthe lock holder never took the lock— the known fixed-deadline flake on that file — and the re-run is the green one above; nothing in this diff touches it.node scripts/version.mjs check→version: 0.4.4 ok.node scripts/changelog.mjs check→changelog: 22 fragment(s) ok.The migration line was exercised on a database written by the base code: opening that file with the tip code adds
attribution_ground_jsontojobsand the old row reads back withattribution_ground_json: null.UI evidence
Sixteen frames, before and after,
en/zh× 1280/360, on the job page and on the dashboard job row, on theevidence/368branch: commit97fbdb3761fb71b896ef3e4fa50deb1644c18755for the eight job-page frames and commitc22dd3740d270b34b281fb1c7b12c01031ecccb0for the eight dashboard frames (the repository keeps screenshots onevidence/*branches, so the tree that merges carries the code only).Each side is produced by its own tree's own team capture against its own SQLite file: the before frames come from a worktree at
25d0c459whosecaptureTeamStatswrote the observation over the claim, and the after frames come from this tip. Both seeded the same way: a succeeded job claimingimplementedBy: Dev-1,testedBy: Test, served by a loopback server on its own port and signed in as the same account, plus a second job whose Test seat actually made calls. The frame is taken after the Result card is scrolled into view — the earlier attempt framed the top of the page, where the line is not, and produced identical pairs.The dashboard row needed a second pass, and the reason was not a scroll container. The jobs table sits inside a collapsed
<details class="secondary">; while that section is closed the row has no box at all, so a page scroll stops at the section header and the earlier attempt framed the header rather than the line. Each dashboard frame here is taken with the section opened the way a reader opens it, thejob_368_unobservedrow scrolled to the middle of the viewport, and the row's own text read back at the exact point the shutter opens (elementFromPointreturns that text). The frame therefore shows the row, and the pair differs at every size — before 105,194 bytes against after 106,974 bytes aten/1280, and every one of the four pairs differs byte for byte.The row's text is also read back from the DOM at capture time, so the claim does not depend on a reader opening a PNG:
Lead Claimed · Dev-1 ImplementedLead Claimed · Dev-1 Implemented · Test Tested · claimed, not observedLead 领取 · Dev-1 实现Lead 领取 · Dev-1 实现 · Test 测试 · 声称,未观察Lead Claimed · Dev-1 Implemented · Test TestedthenLead Claimed · Dev-1 Implemented· Test Tested · claimed, not observedLead 领取 · Dev-1 实现 · Test 测试thenLead 领取 · Dev-1 实现· Test 测试 · 声称,未观察documentElement.scrollWidth - clientWidth = 0on every frame, at 360 and 1280, both pages, both locales, both trees.<p class="fine">; it adds no control and no tab stop, so the tab order is the one it already had.zhsays声称,未观察and not an English string.docs/code-standards.mdalready requires of.fine; nothing here introduced a lighter grey.Ran:
npx tsx --test test/attributionGrounding.test.tsat25d0c459d0b4a69a55e5884769cf0eb90f79f46d— 3 passed, 4 failed (the red above)npx tsx --test test/attributionGrounding.test.tsat the tip — 7 passed, 0 failednpx tsx --test test/attribution.test.ts test/teamStats.test.ts test/pages.test.ts test/db.test.ts test/jobs.test.ts— 241 passed, 0 failednpm run checkat the tip — exit 0node scripts/risk-gate.mjs --base 25d0c459— the machine line abovenode scripts/changelog.mjs check— 22 fragments oknode scripts/version.mjs check— 0.4.4 okattribution_ground_jsonadded, old row readsnullNot run:
teamStateseam the service uses, with a stub returning per-role call counts, so no HTTP reached a real bridgescripts/visual-matrix.ts(the overflow, focus and touch checks are done on the two pages above instead),scripts/mock-snapshot.ts, and any external a11y scannerRollback
Revert the commit. The column is additive: an older binary ignores
attribution_ground_json, and a row written by this code still has its claim inattribution_json, so nothing is lost on a revert. The page falls back to today's reading for any row without a ground record.Docs and changelog
docs/architecture.mdis updated in the same PR (its paragraph promised this behaviour and described only the event).changelog.d/368.added.mdcarries the user-visible line. NoDocs-not-needed:claim.answering body ea8bd38ffb3f (issue-gate)