Repository navigation
Conversation
HugoXK-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS at 21e624c
- The erasure is real and reproduced: the console's rows are server-rendered through
jobTable, which already marks the claim (src/views/pages.ts:589), while at basepublic/team.js:178-183rewrote the cell from the structuredattributionviaattribution()(:48-60), which has no marker vocabulary — so any tick over a marked row drops the mark. At the tip both transports carryattributionText(src/app.ts:3588-3597poll,:3865-3891stream) and the script prefers it with the structured fallback for an older payload (public/team.js:181-185). - The stream claim is verified over the real endpoint, not a formatter mock:
test/team.test.ts:249opens the SSE stream and assertsattributionText === 'Dev-1 编写 · 声称,未观察 · Dev-2 编写'on the snapshot and the same on the 5-second poll; at base that read isundefinedand the test fails exactly there. - The change-story row keeps
model · roleand moves the judgement into the note:src/lib/changeStory.ts:216-231derivesstatefrom the ground,:281-287selectsclaimed, not observed/claimed, not verified, andsrc/views/pages.ts:4188renders the note; a grounded claim stays unmarked, which the test also pins. - One reconstruction inside this tree:
attributionGroundFor(src/lib/attribution.ts:130-152) andclaimedRoleState(:156-180) replace the copy that lived inpages.ts, and the job team line, the change-story row and both console transports read it. Non-blocking, cross-PR:#1210moves the same legacy reconstruction tosrc/lib/teamStats.ts:55andexport.tsreads it, so on a post-#1210rebase this should call that helper rather than keep a second copy (they also differ on empty steps:{steps: []}here vsnull). - Red then green: 107/107 at the tip (pages, team, changeStory); at base
044c7515with the two committed test files, 82 pass / 2 fail — the missing row note andundefinedversus the marker — andpr-lint: ok (#1212, T2, 14 files).
Ran: npx tsx --test test/pages.test.ts test/team.test.ts test/changeStory.test.ts (107/107 in a tree built as base 044c7515 + this diff, all 14 blobs including the 4 PNGs equal to head); npx tsx --test test/pages.test.ts test/team.test.ts with only the committed test files at base (82 pass, 2 fail as quoted); node scripts/pr-lint.mjs --pr 1212 (ok, T2, 14 files).
Not run: full npm run check locally (CI ci-ok 136940098715 success; the newer pr-lint run 136940272374 is success at 18:23:24, superseding the 18:19:34 failure); no live FlyBot instance (the PR's own harness uses a stub bridge), no English screenshots, and no pixel inspection of the four PNGs (1116x727 and 1116x73) — this model has no image input.
Written-by: HugoXK-bot
…sole The job page's "Why this change" row printed "model · role" without saying whether the record observed that seat, and the console row was built from the structured attribution alone, so a claim nothing checked read as a fact on both surfaces. One reconstruction of the record (attributionGroundFor) now answers for the job page, the change-story row and the console, and the console receives the server-rendered string so its live stream cannot drop the mark.
A: the job page's "Why this change" row. B: the console job row after its live stream tick. Both trees are the same seeded job, one whose written/implemented seat the ground record never observed.
Written-by: Fledge Platform Dev-1
Fixes #1190
What changed
A claim was printed as a fact in two more places than the job page's team line.
model · rolein the模型与角色 / Model and rolerow without saying whether the record observed that seat. It now carries the same mark the team line uses —声称,未观察/claimed, not observed, or声称,未核实/claimed, not verifiedwhen the row predates the observation record — in the row's note, so the value stays what the job claimed and the note says how far it was checked.public/team.js) never carried a marker at all. The console's live stream sends the structuredattributionobject, and the client formatter has no marker vocabulary, so the seat was reprinted bare on every tick — the server-rendered row was correct and the stream erased it. The stream and the poll now send the server-renderedattributionTextbeside the structured field, and the script prefers it; the structured fallback stays for an older payload, so an old server still renders, just without the mark.Both surfaces, and the job page's team line, now take the judgement from one function,
attributionGroundFor({ groundJson, attributionJson, teamStatsJson }), moved out ofsrc/views/pages.tsintosrc/lib/attribution.tswithclaimedRoleState(ground, role). There is one reconstruction of a pre-observation row, so the three readers cannot disagree; the console carries no marker words of its own, only the string the server rendered in the reader's language.Docs:
docs/architecture.mddescribes the shared reconstruction,docs/api.mdrecords that the team endpoints carryattributionText. Changelog fragmentchangelog.d/1190.fixed.md(user-visible).Screenshots
One seeded job,
writtenBy/implementedBy=Dev-1, ground stepsclaimed: Dev-1, observed: null, state: unobserved. Same database row against both trees.A — job page,
模型与角色rowBefore:

DeepSeek-V4.1-Flash-1017 · Dev-1After:

DeepSeek-V4.1-Flash-1017 · Dev-1with声称,未观察under itB — console job row, after the live stream has ticked
Before: the HTML the server sent reads

Dev-1 实现 · 声称,未观察, and the first stream tick replaces it withDev-1 实现After: the tick leaves

Dev-1 实现 · 声称,未观察in placeThe frames were taken with a stub bridge answering the instance
statecall, so the console's SSE tick ran for real; nothing was mocked in the product code. Harness output for the same run, in the tree order before → after:Alternatives considered
public/team.js): rejected — the script has no ground record, so it would have to guess, and the console would then hold a second copy of the marker vocabulary that could drift from the job page. Two surfaces reproducing a rule is what produced this defect.attributionobject (e.g. aroleWithMarkerstring): rejected — the structured field is a typed claim (writtenBy: 'Dev-1'), and putting display words in it would hand every consumer a value that is not the attribution.attributionGroundForinpages.tsand import it intoapp.ts: rejected —app.tsimports fromviews/pages.tsalready, but the reconstruction is record semantics, not a page shape, and the change-story row needed it inlib/anyway.ChangeStoryAttribution.staterequired: rejected — three existingtest/changeStory.test.tsliterals test the model/role pair alone, and a required field would force them to assert a judgement they do not exercise.undefinedreads as "no judgement" and the row prints no note.Uncertainty and residual risk
attributionTextis added to the team payloads; a client that reads only the structured field is unaffected, and the script's fallback still renders for a payload without the text. An older server paired with the new script therefore renders as before, unmarked — the mark is produced by the server, which is the point.attribution_jsonwas overwritten bycaptureTeamStatsstill reads as grounded, because the column that would have held the claim is gone. This PR does not invent what the record does not have.Ran:
npm run checkat21e624c— pass,# tests 3294 / # pass 3294 / # fail 0, lint 11 warnings (baseline), build ok.044c7515with the new tests copied onto the base tree:test/pages.test.ts—not ok 1 - #1190: the change-story row marks a claimed role the record did not observe,error: 'the claim the instance did not see is marked, in the row note', actual is the block without the note.test/team.test.ts—not ok 1 - team events stream pushes a live snapshot,error: 'the claim is marked and the seat the instance did see is printed beside it',+ actual - expected+ undefined/- 'Dev-1 编写 · 声称,未观察 · Dev-2 编写'.npx tsx --test --test-name-pattern='…' test/pages.test.ts test/team.test.tsat the tip — both pass.node scripts/risk-gate.mjs --base origin/main—risk-tier: T2; basis: public/team.js.node scripts/changelog.mjs check—changelog: 4 fragment(s) ok;node scripts/version.mjs check—version: 0.4.5 ok.Not run:
statecall, not a real FlyBot instance — the tick path and the payload are real, the team data is not.test/pages.test.ts.Risk, rollback, docs
risk-gate, basispublic/team.js;src/app code and apublic/script).docs/architecture.md(attribution paragraph — one reconstruction, three readers) anddocs/api.md(team endpoints carryattributionText).Changelog: changelog.d/1190.fixed.md.