FE-1573: Construct and explain a net region from a real conversation - #9722
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview Ledger/workpiece settlement moves toward one-upload writes with server-validated evidence locators; Large deletions drop the capture/archive binding package, harness apply-sweep, legacy browser tracers and prepared-fixture tests, and the old root-arc identity layer—browser mutation verification lives in Flue 2.0.3 patch carries context projection through compaction/repair, tool-scoped Reviewed by Cursor Bugbot for commit f847c91. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
Provider credentials are not isolated from the Pi child, and focused locator reads still perform unnecessary history retrieval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Advances Mission 7d recovery by reducing model-context payloads, enabling mixed OpenAI/Anthropic persona runs, and removing the retired capture/archive binding.
Changes:
- Adds focused workpiece reads, context projection, and recovery/freshness coverage.
- Adds configurable provider/model/reasoning settings and OpenAI transport tests.
- Removes the unused capture-store and
binding-fluearchitecture.
File summaries
| File | Description |
|---|---|
yarn.lock |
Updates workspace and patch resolutions. |
libs/@hashintel/brunch-agent/README.md |
Updates package topology. |
libs/@hashintel/brunch-agent/packages/transport-aisdk/vite.config.ts |
Derives externals from manifest. |
libs/@hashintel/brunch-agent/packages/plugin-sdcpn/vite.config.ts |
Derives externals from manifest. |
libs/@hashintel/brunch-agent/packages/plugin-sdcpn/src/skills/sdcpn-modelling/SKILL.md |
Updates recovery/read guidance. |
libs/@hashintel/brunch-agent/packages/plugin-sdcpn/.oxlintrc.json |
Removes retired storage restriction. |
libs/@hashintel/brunch-agent/packages/plugin-gherkin/vite.config.ts |
Derives externals from manifest. |
libs/@hashintel/brunch-agent/packages/plugin-gherkin/src/skills/gherkin-specification/SKILL.md |
Refreshes core alignment. |
libs/@hashintel/brunch-agent/packages/plugin-gherkin/.oxlintrc.json |
Removes retired storage restriction. |
libs/@hashintel/brunch-agent/packages/plugin-dafny/vite.config.ts |
Derives externals from manifest. |
libs/@hashintel/brunch-agent/packages/plugin-dafny/src/skills/dafny-verification/SKILL.md |
Refreshes core alignment. |
libs/@hashintel/brunch-agent/packages/plugin-dafny/.oxlintrc.json |
Removes retired storage restriction. |
libs/@hashintel/brunch-agent/packages/plugin-claims/vite.config.ts |
Derives externals from manifest. |
libs/@hashintel/brunch-agent/packages/plugin-claims/src/skills/claims-formalization/SKILL.md |
Refreshes core alignment. |
libs/@hashintel/brunch-agent/packages/plugin-claims/.oxlintrc.json |
Removes retired storage restriction. |
libs/@hashintel/brunch-agent/packages/core/vite.config.ts |
Updates entries and externals. |
libs/@hashintel/brunch-agent/packages/core/turbo.json |
Removes Linear task. |
libs/@hashintel/brunch-agent/packages/core/test/update-workpiece.test.ts |
Tests focused workpiece reads. |
libs/@hashintel/brunch-agent/packages/core/test/types/compile-contracts.ts |
Removes retired evidence contracts. |
libs/@hashintel/brunch-agent/packages/core/test/session-log.test.ts |
Removes archive tests. |
libs/@hashintel/brunch-agent/packages/core/test/compaction-config.test.ts |
Tests model option forwarding. |
libs/@hashintel/brunch-agent/packages/core/test/architecture/linear-project-graph.test.ts |
Removes packaged utility tests. |
libs/@hashintel/brunch-agent/packages/core/test/architecture/fixtures/baseline-anthropic-stub.ts |
Removes obsolete fixture. |
libs/@hashintel/brunch-agent/packages/core/src/storage.ts |
Removes storage subpath. |
libs/@hashintel/brunch-agent/packages/core/src/skills/elicitation/SKILL.md |
Documents focused read behavior. |
libs/@hashintel/brunch-agent/packages/core/src/prompts/SYSTEM.md |
Updates authoritative-read guidance. |
libs/@hashintel/brunch-agent/packages/core/src/index.ts |
Removes retired evidence exports. |
libs/@hashintel/brunch-agent/packages/core/src/flue.ts |
Adds model options and focused reads. |
libs/@hashintel/brunch-agent/packages/core/src/conversation/ask-tool-contract.ts |
Restores active ask contracts. |
libs/@hashintel/brunch-agent/packages/core/src/client-tools.ts |
Uses active ask contracts. |
libs/@hashintel/brunch-agent/packages/core/src/_suspended/conversation/sweep-protocol.ts |
Removes suspended sweep protocol. |
libs/@hashintel/brunch-agent/packages/core/src/_suspended/conversation/ask-protocol.ts |
Removes suspended ask signal. |
libs/@hashintel/brunch-agent/packages/core/src/_suspended/conversation/affordance.ts |
Removes suspended affordance. |
libs/@hashintel/brunch-agent/packages/core/package.json |
Removes storage and Linear surfaces. |
libs/@hashintel/brunch-agent/packages/core/docs/task-dependencies.json |
Removes Linear task metadata. |
libs/@hashintel/brunch-agent/packages/binding-flue/vite.config.ts |
Removes binding build configuration. |
libs/@hashintel/brunch-agent/packages/binding-flue/turbo.json |
Removes binding task configuration. |
libs/@hashintel/brunch-agent/packages/binding-flue/tsconfig.json |
Removes binding TypeScript configuration. |
libs/@hashintel/brunch-agent/packages/binding-flue/test/types/public-surface.ts |
Removes binding contract test. |
libs/@hashintel/brunch-agent/packages/binding-flue/test/reply-projector.test.ts |
Removes projector tests. |
libs/@hashintel/brunch-agent/packages/binding-flue/test/capture-accounting.test.ts |
Removes capture tests. |
libs/@hashintel/brunch-agent/packages/binding-flue/src/reply-projector.ts |
Removes Flue reply adapter. |
libs/@hashintel/brunch-agent/packages/binding-flue/src/local-capture-store.ts |
Removes local capture store. |
libs/@hashintel/brunch-agent/packages/binding-flue/src/index.ts |
Removes binding entry point. |
libs/@hashintel/brunch-agent/packages/binding-flue/src/history-reader.ts |
Removes archive history reader. |
libs/@hashintel/brunch-agent/packages/binding-flue/src/capture-accounting.ts |
Removes capture accounting. |
libs/@hashintel/brunch-agent/packages/binding-flue/src/capabilities.ts |
Removes binding capability record. |
libs/@hashintel/brunch-agent/packages/binding-flue/src/archive-capability.ts |
Removes archive capability. |
libs/@hashintel/brunch-agent/packages/binding-flue/package.json |
Removes binding package. |
libs/@hashintel/brunch-agent/packages/binding-flue/docs/task-dependencies.json |
Removes binding task metadata. |
libs/@hashintel/brunch-agent/packages/binding-flue/.oxlintrc.json |
Removes binding lint configuration. |
libs/@hashintel/brunch-agent/evaluations/README.md |
Documents persona model defaults. |
libs/@hashintel/brunch-agent/evaluations/protocols/network-guard/loopback-only.sb |
Allows the private persona socket. |
libs/@hashintel/brunch-agent/docs/reference/architecture/topology.md |
Records simplified topology. |
libs/@hashintel/brunch-agent/docs/reference/architecture/flue-routing.md |
Documents context projection. |
libs/@hashintel/brunch-agent/docs/mission-drafts/worked-example-distribution-and-breadth.md |
Updates Mission 7d dependencies. |
libs/@hashintel/brunch-agent/docs/mission-drafts/7-explainable-construction.md |
Reallocates Mission 7 scope. |
libs/@hashintel/brunch-agent/docs/mission-drafts/11-optimisation-handoff.md |
Updates optimization handoff. |
libs/@hashintel/brunch-agent/docs/mission-drafts/10-bounded-reviewer-revision.md |
Updates reviewer-revision plan. |
libs/@hashintel/brunch-agent/docs/mission-archive/README.md |
Archives Mission 7c. |
libs/@hashintel/brunch-agent/docs/agents/linear-project-graph.ts |
Parks the Linear utility. |
libs/@hashintel/brunch-agent/docs/agents/issue-tracker.md |
Documents manual utility use. |
libs/@hashintel/brunch-agent/AGENTS.md |
Updates topology rules. |
apps/petrinaut-website/docs/task-dependencies.json |
Removes binding dependency. |
apps/brunch-agent/turbo.json |
Passes OpenAI/model settings. |
apps/brunch-agent/test/workpiece-evidence.integration.ts |
Tests focused evidence retrieval. |
apps/brunch-agent/test/runbook-elicitation-faux-provider.ts |
Removes obsolete faux provider. |
apps/brunch-agent/test/runbook-elicitation-faux-expert.ts |
Removes obsolete faux expert. |
apps/brunch-agent/test/provider-registration.test.ts |
Tests both providers. |
apps/brunch-agent/test/persona-construction.integration.ts |
Adds OpenAI persona coverage. |
apps/brunch-agent/test/persona-configuration.test.ts |
Tests provider-specific credentials. |
apps/brunch-agent/test/openai-responses-carriage.test.ts |
Tests OpenAI tool conversion. |
apps/brunch-agent/test/net-freshness.test.ts |
Covers revision identity freshness. |
apps/brunch-agent/test/native-openai-provider.ts |
Adds synthetic native OpenAI provider. |
apps/brunch-agent/test/local-dev-origins.test.ts |
Checks forwarded model variables. |
apps/brunch-agent/test/integration/workpiece-revisions.test.ts |
Strengthens mutation receipt assertions. |
apps/brunch-agent/test/integration/petrinaut-chat.test.ts |
Removes capture assertions. |
apps/brunch-agent/test/integration/petrinaut-chat.integration.ts |
Removes capture sweep execution. |
apps/brunch-agent/test/integration/petrinaut-chat-result.ts |
Removes capture result fields. |
apps/brunch-agent/test/integration/history-retention.test.ts |
Adds projection/reopen coverage. |
apps/brunch-agent/test/integration/history-retention-crash-audit.ts |
Verifies complete mutation receipts. |
apps/brunch-agent/test/integration/build-artifact.test.ts |
Updates bundle assertion. |
apps/brunch-agent/test/history-retention-crash.integration.ts |
Verifies mutation summaries after recovery. |
apps/brunch-agent/test/dev-configuration-preflight.test.ts |
Tests OpenAI preflight. |
apps/brunch-agent/test/db-path.test.ts |
Removes capture-path tests. |
apps/brunch-agent/test/construction-progression.integration.ts |
Uses canonical read tools and types. |
apps/brunch-agent/test/chat-agent-compaction.test.ts |
Tests thinking and projection setup. |
apps/brunch-agent/src/evaluations/runbook/headless-petrinaut-client.ts |
Exposes direct-edit testing. |
apps/brunch-agent/src/evaluations/runbook/campaign-integrity.ts |
Removes obsolete campaign utilities. |
apps/brunch-agent/src/evaluations/persona/launch/role-settings.ts |
Adds role-specific model resolution. |
apps/brunch-agent/src/evaluations/persona/launch/resume.ts |
Restores role settings on resume. |
apps/brunch-agent/src/evaluations/persona/launch.test.ts |
Tests mixed-role configuration. |
apps/brunch-agent/src/evaluations/persona/configuration.ts |
Selects provider credentials. |
apps/brunch-agent/src/evaluations/install-faux-provider.ts |
Supports Anthropic and OpenAI mocks. |
apps/brunch-agent/src/dev-configuration-preflight.ts |
Validates selected provider configuration. |
apps/brunch-agent/src/db-path.ts |
Removes capture-store paths. |
apps/brunch-agent/src/chat-model.ts |
Adds provider and thinking selection. |
apps/brunch-agent/src/capture/apply-sweep.ts |
Removes capture sweep implementation. |
apps/brunch-agent/src/app.ts |
Registers OpenAI provider. |
apps/brunch-agent/src/agents/chat-agent/agent.ts |
Enables projection and model options. |
apps/brunch-agent/README.md |
Removes capture-store documentation. |
apps/brunch-agent/package.json |
Updates dependencies. |
apps/brunch-agent/flue.config.ts |
Enables OpenAI bundling. |
apps/brunch-agent/docs/task-dependencies.json |
Removes binding build dependencies. |
apps/brunch-agent/.pi/extensions/brunch-persona-testing/README.md |
Documents mixed-provider persona runs. |
Review details
- Files reviewed: 124/126 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Merging this PR will not alter performance
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
as_constant |
< 1 ns | < 1 ns | N/A | |
constant_equal |
< 1 ns | < 1 ns | N/A | |
constant_not_equal |
< 1 ns | < 1 ns | N/A | |
access |
< 1 ns | < 1 ns | N/A | |
runtime_equal |
< 1 ns | < 1 ns | N/A | |
runtime_not_equal |
< 1 ns | < 1 ns | N/A |
Comparing ln/fe-1573-mission-7d-recovery (f847c91) with main (5af427b)1
Footnotes
9788d6f to
32977d5
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Compress the branch's accomplishments into an Established base preamble and add a remediation plan with four work packages: workpiece payload and settlement authority, host-metadata subtraction from model context, retirement of `brunch_mark_question`, and a Brunch-owned live pending-tool channel. Record the measured baseline from `run-5uSidX`, Lu's dated decisions, Kostandin's confirmation that the question marker can be removed, and the new Deferred homes in the future spine. Also align the app and persona operator READMEs with the current tool names, Chat/Ledger tabs and Flue-owned workpiece state. Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
…retirement and live pending channel WP-A: mutate_workpiece no longer echoes Markdown; the Ledger folds a settled revision from its bound canonical input. read_workpiece drops the pre-read upload and defaults includeSources to false. Argument projection ships default-off. WP-B: host metadata sidecars stay out of model-visible tool results; the catalogue is audited per tool. WP-C: brunch_mark_question is unmounted with its guidance; voice derives the question segment client-side from finalized text. WP-D: a Brunch-owned live tool channel fed by Flue observe() is merged client-side into the AI SDK stream so tool rows pass through pending. Adds yarn measure:context-replay for canonical replay measurement. test:reopened-why (legacy root-arc tracer) is red pending its removal. Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
…tracer layer Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
…ission (WP-E)
Cut the crew-reservation prepared fixture, browser tracer scripts, legacy
question-marker fixture, reopened-why retention harness and the root-arc
verifier residue; Brunch is forward-only and carries no legacy adapters.
Rename the narrowed verifier to mutation-delivery.
Restore read_petrinaut_net and read_petrinaut_diagnostics to the admission
browserToolNames in app.ts (regression from the earlier cut) and export the
tool names from plugin-sdcpn.
Give superseded mutate_workpiece argument projections an explicit
{ revisionId, sha256, superseded: true } markdownReference instead of a
self-referencing retainedEntryId. Update passage-policy and compiler-feedback
integration tests to the pointer-only contract, and refresh CONTEXT.md,
topology.md, the mutation capability matrix, evaluations and app READMEs,
and MISSION.md implementation state.
Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e
Co-authored-by: Amp <amp@ampcode.com>
…nd live chronology Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
…ontext Mission 7d WP-F. `mutate_workpiece` evidence is declared as literal text plus true-user message ids and resolved to locators server-side; an absent or ambiguous text refuses the whole settlement with nothing written. `read_workpiece` drops candidate Markdown and `includeSources` in favour of `sourceIds`, so no settlement needs a preceding upload and no read enumerates the conversation. The context projection prefixes each true-user entry with its Flue message id, and reduces `mutate_petrinaut_net` outcomes to identity and status for the model. A turn-chronology observer logs per-request timing and per-tool-call argument streaming at settlement so a provider stall can be told from slow generation. Guidance carries the bounded settlement lifecycle promoted from the side quest, and the panel labels a sources read only when ids are given. Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
…g and net-read economy Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
…remove the satisfied side quest Amp-Thread-ID: https://ampcode.com/threads/T-01a0a551-bc9f-719b-bc64-e5b17cfeb02e Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0a8a5-fe06-7695-9583-f39bf4522052 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aca9f16. Configure here.
Amp-Thread-ID: https://ampcode.com/threads/T-01a0a8a5-fe06-7695-9583-f39bf4522052 Co-authored-by: Amp <amp@ampcode.com>
Benchmark results
|
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 2002 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 1002 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 3314 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 1527 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 2078 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 1033 | Flame Graph |
policy_resolution_medium
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 102 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 52 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 269 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 108 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 133 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 63 | Flame Graph |
policy_resolution_none
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 2 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 2 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 8 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 3 | Flame Graph |
policy_resolution_small
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 52 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 26 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 94 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 27 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 66 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 29 | Flame Graph |
read_scaling_complete
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id;one_depth | 1 entities | Flame Graph | |
| entity_by_id;one_depth | 10 entities | Flame Graph | |
| entity_by_id;one_depth | 25 entities | Flame Graph | |
| entity_by_id;one_depth | 5 entities | Flame Graph | |
| entity_by_id;one_depth | 50 entities | Flame Graph | |
| entity_by_id;two_depth | 1 entities | Flame Graph | |
| entity_by_id;two_depth | 10 entities | Flame Graph | |
| entity_by_id;two_depth | 25 entities | Flame Graph | |
| entity_by_id;two_depth | 5 entities | Flame Graph | |
| entity_by_id;two_depth | 50 entities | Flame Graph | |
| entity_by_id;zero_depth | 1 entities | Flame Graph | |
| entity_by_id;zero_depth | 10 entities | Flame Graph | |
| entity_by_id;zero_depth | 25 entities | Flame Graph | |
| entity_by_id;zero_depth | 5 entities | Flame Graph | |
| entity_by_id;zero_depth | 50 entities | Flame Graph |
read_scaling_linkless
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id | 1 entities | Flame Graph | |
| entity_by_id | 10 entities | Flame Graph | |
| entity_by_id | 100 entities | Flame Graph | |
| entity_by_id | 1000 entities | Flame Graph | |
| entity_by_id | 10000 entities | Flame Graph |
representative_read_entity
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1
|
Flame Graph |
representative_read_entity_type
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| get_entity_type_by_id | Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba
|
Flame Graph |
representative_read_multiple_entities
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_property | traversal_paths=0 | 0 | |
| entity_by_property | traversal_paths=255 | 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=0 | 0 | |
| link_by_source_by_property | traversal_paths=255 | 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true |
scenarios
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| full_test | query-limited | Flame Graph | |
| full_test | query-unlimited | Flame Graph | |
| linked_queries | query-limited | Flame Graph | |
| linked_queries | query-unlimited | Flame Graph |

🌟 What is the purpose of this PR?
This branch set out to continue the recorded Inventory purchasing worked example, but the first full-scale observation showed that the product path was not yet demonstrable:
run-5uSidXgrew from 15.3k to 130k prompt tokens over 204 model steps, spent 85 of 123 tool calls marking questions, regenerated the Ledger repeatedly, and gave the user no visible pending state while tool arguments streamed.The branch therefore became a focused remediation of that real browser-visible path. Brunch now settles each Ledger revision in one upload with text-cited, server-validated evidence; keeps host metadata and redundant net results out of model context; removes the question-marker step; shows tool calls while their arguments are still streaming; and records enough live chronology to distinguish slow generation from a provider stall. It also removes the obsolete prepared-fixture, tracer, capture/archive, and generic binding layers so the ordinary product route is the only maintained construction path.
The paid
run-SB5pgxobservation met that remediation discriminator: 44 validated one-upload Ledger revisions, 19 net mutation batches, no stall across 102 submissions, and continued settlement and construction after a live Flue compaction. This establishes a materially leaner and observable construction path. It does not accept the Inventory worked example, establish semantic recovery after compaction, complete experiment configuration, or show that the path is yet fast enough for the intended demo scale.🔗 Related links
🚫 Blocked by
This PR has no outstanding upstream dependency for the remediation it delivers. The broader mission's configuration-only experiment leg remains deferred pending agreement on an inspectable, unstarted configuration lifecycle across #9675 → #9676 → #9678 → #9654; those changes are not included here.
🔍 What does this change?
mutate_workpieceresolves literal evidence text against the submitted Markdown, validates true-user message ids, refuses the whole write on an invalid relation, and returns identity plus validated locators without echoing the body.read_workpiecenow reads sources by id instead of enumerating the conversation.metadata, prefixes true-user entries with their source message id, compacts net-mutation results to hashes and per-operation disposition, and reconstructs each settled revision from its canonical call body plus successful result identity/evidence. Canonical and public history remain unchanged.brunch_mark_question; Voice derives its segment from finalized assistant text instead of paying an extra model step for a marker tool.toolcall_deltaevents to the browser so pending tool rows appear while arguments stream. Canonical admission and browser-tool validation remain authoritative. Review fixes enforce catch-up/queue bounds and preserve live delivery after a full catch-up window.🏗️ Agent notes
Imperative
Advance toward a reproducible browser-visible Inventory purchasing example in which Brunch progressively builds a compiler-clean SDCPN, explains consequential elements from recorded basis, applies one bounded correction, survives original-session reopen, and then helps configure—but does not run—an in-memory experiment. Lu owns semantic and usefulness acceptance.
This branch stops at making that route efficient and observable enough to evaluate honestly. It does not claim the full imperative is accepted.
Throughline
The production path is the canonical
yarn brunch:persona --case inventory-purchasinglauncher into the real Petrinaut UI. The isolated Pi persona contributes ordinary-language testimony; Brunch chooses its tools; the browser executes mutations against the same document and conversation. No screenshot-driven agent, evaluator answer key, operator-authored construction, or fixture overlay substitutes for this path.The observed failure redirected the work:
run-5uSidXshowed duplicated whole-Ledger payload, host sidecars in context, one marker-only model step per reply, invisible argument generation, and stalled construction. WP-A–F removed those costs at their owning boundaries, thenrun-SB5pgxexercised the resulting path at scale.Proof
run-SB5pgxran for 33 minutes with both actors at medium reasoning: 102 submissions, 152 Brunch model steps, and zero step errors. It produced 46mutate_workpiececalls (44 settled, 2 refused and recovered), 19mutate_petrinaut_netbatches, 33 net reads, 6 layouts, 3 diagnostics reads, and only one legitimate workpiece content reread after compaction. Every successful settlement used one body and returnedevidenceValidated: true; no source enumeration or pre-settlement candidate read occurred. The final observed net had 17 places, 17 transitions, and 19 parameters.The chronology recorded every submission. Median time to first model event was 1.1 s; median steps were 22.3 s for
mutate_workpiece, 8.3 s formutate_petrinaut_net, 3.8 s forread_petrinaut_net, and 4.7 s for text. The 122.9 s maximum settlement continuously streamed arguments with a 1.9 s maximum inter-delta gap, identifying low provider throughput rather than a stall.The run crossed a live Flue compaction from 253k cached tokens to 15k at submission 77. Brunch reactivated its skills, reread the workpiece once, settled 14 further revisions, and continued net mutation. This is a live mechanism witness, not proof that semantic usefulness survived compaction.
Synthetic and deterministic coverage passed for context projection and canonical-history immutability; pointer-output workpiece recovery; text-to-locator evidence validation and refusal atomicity; live pending delivery, catch-up, overflow, ownership, and browser rendering; question-marker retirement and Voice derivation; compiler repair through the ordinary route; and mutation provenance including invalid arc targets.
Historical projection measurement
Replaying retained
run-5uSidXcontext through the canonical reducer and context builder reduced the final projected history from 980,984 to 764,169 characters with the shipping defaults. Enabling the default-off superseded-argument projection would reduce it to 701,634 characters. Across the 13 retained client-tool signals, projection reduced 195,902 to 32,173 characters. These are serialized character counts on unchanged retained history, not token or cost measurements; new tool defaults cannot retroactively remove old calls.Client-tool metadata audit
Host
metadataremains available to canonical server and hydration consumers but never enters model context. Every model-required field is inoutput:task,activate_skill,read_skill_resourcemutate_workpiece,read_workpiecequery_workpieceread_petrinaut_docsread_petrinaut_netread_petrinaut_diagnosticslayout_petrinaut_netmutate_petrinaut_netpingConstraints
Flue remains the canonical conversation-history owner; the Markdown workpiece remains the recoverable operational account; Petrinaut owns net schemas, mutation, compilation, and commands. Model projection must preserve entry order and identity and must never alter canonical/public history. The workpiece call input supplies the body; only a successful output supplies revision identity and validated evidence. Host metadata stays outside model context; any field the model needs belongs in
output.The persona remains isolated, the browser remains the mutation executor, and the stock assistant's tools/history remain separate. The pending-tool channel is ephemeral, bounded, in-memory, single-process, and presentation-only. It does not persist speculative state or modify Flue.
Fog-line
markdownReference.retainedEntryIddefect.Stop or reorient
Stop on lost native identity, replayed mutations, invented provenance, stale clean diagnostics, non-atomic evidence refusal, or undisclosed representation loss. Do not weaken the recovery contract for prompt savings, persist speculative pending state, or weaken the ownership guard. Do not claim the worked example from tool success, counts, or a live compaction crossing; Lu's review of the completed model, explanations, correction, diagnostics, legibility, and reopen answer remains required.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
@hashintel/petrinautand@hashintel/petrinaut-coreand includes patch changesets for both📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
turbo.jsonfiles have been updated to reflect thistest:passage-policyandtest:workpiece-evidencestill send the pre-WP-F workpiece input and are carried to draft 7e rather than counted green. The website integration suite was not rerun after WP-F; the narrower product-route and package checks listed below were.test.failscases pin deferred worked-model fixture-copy/distribution gaps. They are unmet obligations, not positive proof.🐾 Next steps
🛡 What tests cover this?
Latest branch verification includes:
lint:tsc,lint:eslint, and unit tests for the touched Brunch core, SDCPN plugin, transport, app, website, Petrinaut, and Petrinaut Core surfaces at their relevant checkpoints.@apps/brunch-agentunit tests: 389 passed; five pre-existing worked-model-bundle cases remain expected failures.@apps/brunch-agentintegration suite passed after WP-F, including fresh-process history retention/reopen and validated message-id evidence carriage.hashdeployment at the time this description was updated.❓ How to test this?
yarn install --immutable, thenturbo run build lint:tsc lint:eslint test:unit --filter '@apps/brunch-agent...'from the repository root.yarn workspace @apps/brunch-agent test:integrationplus the focusedtest:persona,test:compiler-feedback, andtest:native-schemaproduct-route tracers.test/context-projection.test.ts,test/integration/history-retention.integration.ts,test/live-tool-broadcaster.test.ts,test/live-tool-route.test.ts, and the website'slive-pending-tool.integration.test.ts. Confirm canonical history stays unchanged, workpiece revisions recover from call body plus successful result, invalid evidence writes nothing, and speculative rows never bypass canonical admission.yarn brunch:persona --case inventory-purchasingrun is not required for review and must not be started without an explicit allocation. The retained localrun-SB5pgxis the branch's paid observation.📹 Demo
run-SB5pgxis retained locally rather than attached publicly because it contains private persona/run material. It exercised the real browser path for 33 minutes, visibly showed pending and settled tool rows, produced 44 validated one-upload Ledger revisions and 19 net-mutation batches, crossed live compaction, and continued constructing afterward. It is remediation evidence, not a completed or accepted worked-example recording.