Judgment record store: persist judgments once, load them at every citing site - #26
Merged
Merged
Conversation
… own decision Persist ReviewRecord once where authored, load it where cited, instead of retyping it by hand. Phase A (survey of originating chapters) gets its own plan next; Phase B (implementation) waits for Phase A's real findings.
Fully self-contained -- every agent's dispatch prompt is written out in full, per writing-plans' own no-placeholder rule. States explicitly, on disk, that completing this plan triggers writing Phase B's own plan next.
All 8 chapter-survey agents reported in. Confirmed originating cells for all 8 cited-forward identifiers (AC-001, AC-C03, AS-C03, AI-C04, AC-C06, AS-C06, AI-C06, AS-C08). One new finding beyond DL-097's own scope: a 4th retyped copy of AS-C08, inside Ch8 itself (not Ch9/Ch10), flagged as a cross-chapter open question rather than folded into scope silently. Also flagged: no originating cell currently gates on validate_record() passing except Ch8's AS-C08 -- needs a design-reading confirmation before Phase B's contracts are written.
… Ch8's own AS-C08 duplicate; insert save_record() unconditionally
…tasks Uses decisions/work-contract-template.md's own exact CONTRACT field format for every task, not a simplified version. Real sequencing dependencies (Task 1 first, then Tasks 2-6 in parallel, then Tasks 7-8), not the fully- parallel shape the diagram-text-integration Phase B used -- this feature has real load-bearing dependencies between origin and citing chapters.
…ries, not literals 01-traceability-graph.ipynb cell 17's "allocation" strings and 03-engineering-signoff.ipynb cell 19's first premises bullet each hand-typed a fact a prior cell in the same notebook had already computed into a live variable (heatgen_allocations/toaster_allocations; coverage/ties/ tied_to_a_requirement). Both now generate that text from the query result directly, so a later drift in the model can't silently diverge from the printed claim. Confirmed by live execution that the generated text still states the same real facts the removed literals stated.
…efinition DL-097 found this gap but it had no DEFERRED.md entry (confirmed: zero hits for subjectParameter/sourceText before this commit). 01-traceability-graph.ipynb cell 8's requirement_subject() works around it by reading sysx:sourceText instead of a structural field; the workaround is correct and already in place, this just tracks the upstream gap and points at it from the cell.
…om queries; D-038
…2nd retype in 03-revision-flow
…d it instead of a 2nd retype in 03-revision-flow
…etyping or re-querying them
AS-C06 and AS-C08 were hand-retyped verbatim from their Chapter 6/8
originals; both now come from load_record() against the persisted
store instead.
AI-C06 was built differently: by re-running live queries
(perform_relationships, find_allocations, model.eval) against a
freshly loaded Chapter 6 model, rather than retyped. DL-097 called
this "the better pattern" relative to retyping AS-C06/AS-C08. This
commit replaces that pattern too. The live-requery approach was
better than retyping only because, at the time, there was no
persisted store for AI-C06 to be loaded from -- re-deriving its
evidence from the model was the only way to avoid a stale hand
copy. Now that AI-C06 itself is persisted at its own origin
(Chapter 6, Task 5 of this initiative), re-deriving it from scratch
via live queries every time it's cited is itself a redundant
pattern once the store exists, per the judgment-record-store design
spec's own Decision 4 ("loaded, never re-typed, at the point of
citation"). The same construct-once/query-thereafter principle that
replaced retyping also replaces re-querying.
Cell 10 (the perform_relationships/find_allocations/model.eval cell
that only existed to feed AI-C06's construction) is removed
entirely, since nothing else in the notebook references its
performs/allocations/rated_holds/weak_holds results.
Also updates the notebook's own markdown narration (cells 1, 5, 7,
9, and the cell right after the removed one) to describe records as
loaded via load_record() from what each origin chapter persisted
with save_record(), instead of reconstructed, rebuilt, recomputed
or assembled here -- the prior wording described a mechanism this
notebook no longer has.
…I-C06 instead of retyping or re-querying them
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Summary
src/toaster/judgment_store.py(save_record/load_record/records_citing), a persisted JSON store underdecisions/judgment-records/forReviewRecordjudgments (DL-097, DL-098).DEFERRED.mdentry (D-038, OpenSysML's missingsubjectParameterkey onRequirementDefinition).decisions/log.mdDL-097, DL-098, DL-099.Test plan
uv run pytest tests/ glossary/tests/ -q-- 448 passed, 7 deselecteduv run python scripts/check_construction.py --check-- all 10 chapters consistentuv run python -m glossary check-- 0 errorsdecisions/work-contract-template.md