Repository navigation
Conversation
lunelson
added this pull request to stack #10068
October 16, 2026 11:23
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks done
lunelson
force-pushed
the
ln/fe-1850-1336-1851-ledger-provenance-comments
branch
from
October 16, 2026 16:35
a0a1463 to
0237453
Compare
lunelson
force-pushed
the
ln/fe-1850-1336-1851-ledger-provenance-comments
branch
from
October 19, 2026 08:31
0237453 to
6c6fab9
Compare
3 of 4 tasks
lunelson
force-pushed
the
ln/fe-1850-1336-1851-ledger-provenance-comments
branch
from
October 19, 2026 13:45
ff1b216 to
ace369b
Compare
2 of 4 tasks
Petrinaut's assistant panel appends a reserved diagnostics message after client tool results. Brunch's adapter packed it into the human's turn as a JSON envelope that the server never unpacked, so the model and the stored history read raw JSON instead of the user's words. Brunch checks diagnostics through its own getNetCompilationErrors tool, so the adapter now drops the reserved message and the envelope leaves @hashintel/brunch-agent. Making the injection each host's choice is FE-1991.
traceLedger walks back from net elements or record addresses to the reflections, obligations, claims and entities behind them, and the turns those records came from. query_basis now answers from that trace instead of listing every record committed in the same turn as a change, and reports a traced claim a later claim replaced. Each turn now carries the opening of the user's words instead of an empty excerpt.
The Ledger tab renders the projection as React instead of Markdown, marking every record occurrence with its address. Selecting net elements shows the reflections that name them, the claims they rest on and the turns they came from, and highlights those records. Reflections can be shown under their entities, each able to select the net elements it names. namesId moves to @hashintel/brunch-agent so the website matches written IDs the way query_basis does.
…nly for commits The Ledger tab renders the projection as a document, so the Markdown renderer's user skin had no caller left; renderLedgerMarkdown now always carries addresses and kind tokens. The tab's badge counted net changes too, which lit it up while the tab still had nothing to show; it now counts accepted commits only.
Traced records get a stronger fill, a ring and medium weight; the rest of the document recedes while a selection is traced, and the first traced record scrolls into view.
Co-authored-by: Cursor <[email protected]>
… recorded Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
…hown Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
lunelson
force-pushed
the
ln/fe-1850-1336-1851-ledger-provenance-comments
branch
from
October 20, 2026 15:51
79be134 to
0e9955d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0e9955d. Configure here.
…once Co-authored-by: Cursor <[email protected]>
kube
approved these changes
Oct 21, 2026
This branch was successfully 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.

🌟 What is the purpose of this PR?
Brunch and its users can now ask why a net element is modelled the way it is and get an answer from the Ledger. Select something on the canvas and the Ledger tab shows the reflections that name it, the claims they rest on and the user messages behind those claims, and highlights those records in the Ledger. The
query_basistool gives Brunch the same answer. The Ledger tab is now a document whose records carry anchors, which is the ground the next step, comments on the Ledger (FE-1851), builds on.The branch also gives each type shared by the Brunch server and website one owner, mostly in
@hashintel/brunch-agent, and trims that library's exports to what its consumers import.🔗 Related links
🚫 Blocked by
🔍 What does this change?
One backward trace.
traceLedgerfollows a net element to the reflections that name it, then to their claims, entities and discharged obligations, and each record to the user turn it came from. It never walks forward: an entity does not pull in every claim about it.query_basisanswers from that trace alone. Its dispositions arebasis-declared,basis-absent,not-foundandstale-read. It no longer treats records committed in the same turn as an element's basis, so an element no reflection names reads as having no recorded basis. Turn excerpts (240 characters) are filled in. Brunch is told to quote the turns it cites, and to offer no rationale of its own when no basis was recorded.Ledger tab as a document. The tab renders the Ledger projection as React instead of Markdown. Every record occurrence carries
data-ledger-address, and record IDs stay hidden.Canvas selection. A panel explains the selection, or says Brunch recorded no reasoning for it. The records behind it are ringed and the rest fade; the first scrolls into view.
Reflections. Show Brunch's reflections, off by default, lists each reflection under the entities it concerns. Show in net selects the elements it names. The tab reads and sets the selection through Brunch's editor plugin, so the host passes nothing.
Badge. The Ledger tab's badge counts commits only; net changes add nothing to read there.
Markdown only for the model. The user skin of
renderLedgerMarkdownhad no callers left and is removed. The model's Markdown is unchanged, byte for byte.User turns. Petrinaut's injected diagnostics are dropped from Brunch's user turns, and the
petrinaut-contextual-user-messageenvelope is removed. Making that injection optional per host is FE-1991.Shared ID matching.
namesIdmoves into@hashintel/brunch-agent, withnetElementSelectionItemandnamesSelectionItem, so the website matches the IDs Brunch wrote asquery_basisdoes.react-markdownandremark-gfmleave the website.Type ownership. The library's README states which code belongs there: what the server and browser must agree on. The library now owns, and both sides import:
NetStructure);The server takes thinking levels, JSON and chronology types from Flue. The website takes its voice, approval and replay types from their owners. The library exports only what its consumers import.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
@hashintel/brunch-agent, which is private, and the unpublisheddocs/of@hashintel/petrinaut. No changeset.📜 Does this require a change to the docs?
libs/@hashintel/petrinaut/docs/ai-assistant.mddescribes the selection panel, the reflections switch and the badge.apps/brunch-agent/docs/petrinaut/ARCHITECTURE.mddescribesquery_basisand the tab.🕸️ Does this require a change to the Turbo Graph?
query_basisassume reflections name the net elements they explain. Nothing enforces that yet (FE-2020). In a live session, reflections named every top-level place and transition but no parameters, arcs or elements inside a subnet.ledger_compilenor the Ledger tab (from FE-1764: Keep elicited knowledge in an efficient append-only Ledger #9865).src/server/provider-admission.test.tsfails intermittently, also when run alone. It predates this branch.🛡 What tests cover this?
traceLedger, the projection's per-entity reflections, ID matching andquery_basisdispositions have unit tests.query_basisand answered from the reflections and claims behind it. Asked about a parameter no reflection names, it said no basis was recorded.@hashintel/brunch-agent,@apps/brunch-agent,@apps/petrinaut-websiteand@tests/petrinaut-brunch-integration.