A phrase decision records the inputs it considered, so staleness is a changed basis rather than a clock - #878
Merged
Merged
Conversation
… changed basis rather than a clock Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
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.
Implements the lifecycle #807 asked for as a design rather than another local fix, recorded as ADR 0053. Stacked on #876; this PR shows only its own diff once that merges.
The idea in one line: a phrase decision stores a fingerprint of the inputs it considered, and it is stale when the fingerprint of the current inputs differs. Nothing is compared to a clock any more.
What changes
phrase_bindings.basis(migration 0072): the fingerprint of both endpoint classes' ancestor closures, whether the object is a value, and the admitted candidate properties with theirupdated_at. Agent decisions carry it; a person's decision does not, because it is never re-evaluated by the agent.legal_entityis now a candidate for anorganizationsignature (Design the lifecycle of phrase alignment decisions and reevaluation #807's first bug), and the candidate line tells the modelfits by inheritance: organization is a subclass of legal_entity; the system prompt says that this is a fit. Widening candidates in code without showing the basis made the model answer null (Respect inherited phrase candidates and retire unsupported bindings #801's finding).nonewithvotes.reason = "no_candidates", so a projection whose support is gone retires at the next materialisation (Design the lifecycle of phrase alignment decisions and reevaluation #807's second bug); more thanCANDIDATE_LIMIT→undecidedwithreason = "too_many_candidates"and the count, which puts it in the alignment queue for a person instead of requeueing a run that can never execute. The queue card says so in both languages.design/ontology.md; index rows for 0053 and for 0052, which feat(api): serve retained document content and versions #860 had left out of both tables.Verified against pgvector/pgvector:pg16 on a fresh database (numbers below), with seven lifecycle regressions driven by a scripted model against real PostgreSQL:
noneplus unit tests for inheritance fit and for the closure over a diamond hierarchy. The four existing
negative_binding_definition_editregressions still pass;phrase_bindings::stalestays for them and for anything else that wants the coarse timestamp signal, but the worker no longer reads it.Not in this PR, said in the record: the kind-word aligner keeps timestamp staleness (#795's reproduction is on
align_types; same design, different inputs, next cut), and there is no revision table of decisions.🤖 Generated with Claude Code