Repository navigation
A reuse keeps what a person decided after the agent read it - #1288
Merged
WaylandYang merged 3 commits intoOct 16, 2026
Merged
Conversation
Signed-off-by: dada-yan <[email protected]>
Signed-off-by: dada-yan <[email protected]>
WaylandYang
approved these changes
Oct 16, 2026
WaylandYang
left a comment
Contributor
There was a problem hiding this comment.
Thank you. Recording the decided_at the agent read and comparing by equality is right, and locking each binding row before reading it means a colleague's decision that commits during the adoption is kept and listed in skipped rather than overwritten; the test checks that by committing while the adoption waits. The #1257 follow-ups are all in. Two optional simplifications for later: build the skipped shape from the proposal's own shape rather than restating same_shape's four keys, so the regression-case filter can't drift from it; and now that alignment_busy is in the global error table, reviewErrors.ts could use that entry instead of keeping a second translation. Merging.
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.
Second of three PRs from my adoption plan on #725; the first merged as #1257.
Problem
0061's decision 3 says "A signature a person decided stays as the person left it", but not against what. On dev 040a533 a reuse (
map_to) writes every shape and kind word it names as the adopter's binding. If a colleague binds one of them elsewhere after the agent read it, adopting overwrites that binding (for a shape, also writing a regression case for the proposal's property) and answers{id}. Nothing tells the adopter, and a reuse whose every item was decided that way is still adopted.Change
propose_lockedstores thedecided_atof each binding it read:seen_decided_aton each shape, and akind_words_seen_decided_atmap insignatures.merge_map_tokeeps the first round's values.FOR UPDATEbefore reading it. A person's decision whosedecided_atdiffers from the recorded read was made after it. The check is equality, not order:decided_atis the deciding transaction's start, so a decision begun before the read can commit after it. With no recorded read (a proposal saved before this change) every person's decision is kept, with nocreated_atfallback (Review queues are organised by what a decision changes #725's no-legacy rule).skippedwith the person's decision. A reuse with nothing left to write answers 409proposal_staleand writes nothing.POST /ontology/proposals/adoptanswers{id, skipped}. When decisions were kept, the toast says how many;proposal_stalegets en and zh strings.align_phrasesonly when it wrote a kind word,alignment_busygets en and zh strings, andapi.decideProposalaccepts only"rejected".Verification
a_reuse_keeps_what_a_person_decided_after_the_agent_read_itruns twoproposerounds against a scripted model, then adopts four reuses and one seeded without read times:nonemade before the read is replaced, on a shape and on a kind word whose row the second round extended;decided_ata day before the read;align_phrases;On dev 040a533 with only this test, it fails at the first adoption (200, no
skipped): dev rewrites all seven bindings, the colleague's too, and adopts every reuse.Linux x86_64 container, Rust 1.98.1, PostgreSQL 16.15 + pgvector 0.8.6, Poppler 25.03, DB required (
UTOPIA_TEST_REQUIRE_DB=1), node 20 for web, commit 54ac182 on dev 040a533:cargo fmt --all --checkand clippy clean;cargo test --locked --workspace1,576 passed, 0 failed, 6 ignored; webpnpm test281 passed,pnpm buildclean.Limits