Skip to content

FE-1573: Inventory worked-model capability and provenance - #9667

Draft
lunelson wants to merge 51 commits into
mainfrom
ln/fe-1573-mission-7c
Draft

FE-1573: Inventory worked-model capability and provenance#9667
lunelson wants to merge 51 commits into
mainfrom
ln/fe-1573-mission-7c

Conversation

@lunelson

@lunelson lunelson commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Purpose

Mission 7c makes Brunch the default Petrinaut assistant inside the operational-process x SDCPN boundary and advances the Inventory worked-model/provenance path without closing FE-1478. A product manager should be able to open an owned Inventory purchasing copy, inspect the retained workpiece and SDCPN, ask where consequential content came from, correct the model in ordinary language, see version-correlated compiler feedback and layout, reopen the same copy, and create a clean copy without changing the template or siblings.

The canonical mission contract is libs/@hashintel/brunch-agent/MISSION.md. The branch is now rebased onto main; the FE-1653 freshness parent merged as #9672, so SIDE_QUEST.md has been removed and freshness is ordinary inherited code.

Current status

Done on this branch:

  • Brunch-default / stock-alternate assistant selection with separate transports, tool surfaces and histories.
  • Expanded mutate_petrinet carrier and aligned schema/plugin/website host executor coverage for 22 admitted add/edit/remove shapes.
  • Unsupported-operation refusal at the offending operation position with the admitted list.
  • Version-correlated TypeScript diagnostics, including pending-not-clean timeout behavior.
  • Dependency invalidation coverage for referenced and unused removals.
  • Recorded applyAutoLayout as a separate browser command with pre/post hashes and position-only effects.
  • Current-net freshness from canonical Flue history, inherited from FE-1653: Ground ordinary Brunch turns in the current Petrinaut net #9672, with net-ledger.ts retained only as a candidate shared projection.
  • Narrow ordinary why routing through fresh getLatestNetDefinition then brunch_why, with the larger why concept still under owner review.
  • Mission contract subtraction: MISSION.md is normative only; implementation chronology stays in this PR.

Not done yet:

  • Postgres-backed ?bundle=inventory-purchasing template/candidate/owned-copy path.
  • Local persona-based production of a versioned Inventory session/workpiece/net fixture, build-time packaging, and idempotent database seeding.
  • Clean-copy inheritance policy, blocked on the why/tool workshop and viability discussion.
  • Six-pack compatibility/capability probes and one non-Inventory product-route construction/correction run.
  • Tool topology/catalogue reconciliation.
  • Final product-manager browser script and closure packet.

Next route

  1. Settle the why/tool workshop first: user-facing concept, name, scope, refusal/absence behavior, authority, code ownership, retained-history compatibility, and clean-copy inheritance implications.
  2. Run cheap fog probes in parallel: why/history parity, provider/carrier shape, template-copy viability, portfolio calibration, and tool-catalogue discovery.
  3. Build the first real Inventory copy tracer: packaged fixture, idempotent Postgres seed, website ?bundle= route, one mutation, same-copy reopen, and template/sibling isolation.
  4. In parallel after the fog gate: seeded-copy mechanics, why/topology/catalogue work, and portfolio/persona-harness work.
  5. Use local persona-based development to produce and record the accepted Inventory fixture bundle, seed it through the deployed path, then run portfolio and product-manager acceptance.

Related links

Verification so far

Representative checks run across the branch include package unit/integration tests for Brunch, Petrinaut website, plugin SDCPN and Petrinaut core; compiler-feedback and mutation-record integrations; browser/live checks for assistant switching and why routing; and formatting/link checks for the mission docs. The final acceptance gates above are not claimed yet.

Pre-merge checklist

  • Publishable library changes include changesets where required.
  • Documentation changes are included.
  • Turbo graph unchanged unless package metadata explicitly changed.

@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Sep 11, 2026 6:44pm UTC
petrinaut Ready Ready Preview Sep 11, 2026 6:44pm UTC
petrinaut-docs Ready Ready Preview Sep 11, 2026 6:44pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 11, 2026 6:44pm UTC

Request Review

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels Sep 11, 2026
@lunelson
lunelson force-pushed the ln/fe-1573-mission-7c branch from c1dac74 to 825b62c Compare September 11, 2026 11:26
@github-actions github-actions Bot added area/tests New or updated tests area/apps labels Sep 11, 2026
@lunelson
lunelson force-pushed the ln/fe-1573-mission-7c branch from 3732528 to 449c1a4 Compare September 11, 2026 11:34
Base automatically changed from ln/fe-1573-mission-7b to main September 11, 2026 12:41
@lunelson
lunelson force-pushed the ln/fe-1573-mission-7c branch from abbc0d3 to ad7a03e Compare September 11, 2026 13:00
@lunelson
lunelson force-pushed the ln/fe-1573-mission-7c branch from ad7a03e to 797ef20 Compare September 11, 2026 13:25
@lunelson
lunelson changed the base branch from main to ln/fe-1653-alternate September 11, 2026 13:25
Load versioned fixture JSON automatically from the app build, validate bundle
identity, evidence-manifest hash, canonical Flue session, non-empty workpiece
and SDCPN definition before seeding, and reject changed bytes under an
unchanged fixture version. Leave the registry empty until a reviewed persona
bundle exists.
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 11, 2026 16:52 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 11, 2026 16:52 Inactive
Route /api/worked-models through the built Brunch application beside the
existing agent endpoint so bundle tests exercise the real HTTP boundary rather
than treating API requests as static files.
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 11, 2026 16:54 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 11, 2026 16:54 Inactive
Use the team's established compiler-clean Inventory net with local Pi-harness
persona development, retaining existing scenario/metric content without making
behavioral or editing claims. Settle one model-facing current-revision
explanation operation with app-owned reconciliation, plugin-owned SDCPN
interpretation and workpiece-owned passage reads. Record supported Flue session
forking as the remaining seeded-copy mechanism question.
Retain the team's exact compiler-clean Inventory SDCPN as the flagship case
source and add a Pi-persona situation pack synthesized from the supplied draft,
with dataset facts, declared assumptions and authored persona behavior kept
explicitly distinct. Pin the reference hash, shape and clean diagnostics in the
portfolio guard.
Add an optional initial-net input to the local persona launcher, validate and
hash the supplied SDCPN, preload it into the ordinary browser product session,
and retain its source identity in the run record so Inventory work can begin
from the established team reference rather than an empty tracer.
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 11, 2026 17:03 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 11, 2026 17:03 Inactive
Drive the built Brunch app and Petrinaut website from ?bundle= through one
model-originated mutation, server-side definition persistence, same-copy reload
with retained Flue history, clean-copy reset from the immutable seed, and a
second principal's isolated sibling. Keep the faux-provider witness explicitly
mechanical rather than persona evidence.
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 11, 2026 17:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 11, 2026 17:04 Inactive
Keep the exact team-supplied Markdown conversion as the durable primary source
for Inventory persona development, record its content hash, and retain the
original DOCX as the source for sections omitted by the conversion.
Record every ordinary browser-bound tool with its definition owner, execution
owner and role, reconcile the living topology with batched construction,
freshness, explanation and worked-model routes, and fail native provider
carriage on duplicate, missing, extra or reordered tool names.
Rename the normative workpiece operations to read_workpiece and
mutate_workpiece, require the mutation boundary to record its verified delta,
and retain legacy names only for historical reads. Record query_workpiece's
unsettled target identity and the unproven autonomous reliability of the Voice
question marker before changing either mechanism.
Mount read_workpiece and mutate_workpiece without ownership prefixes, migrate
active prompts, scripts, tests and the checked tool catalogue, and continue to
recognize legacy update_workpiece settlements in retained histories. Every
mutation now reports the actual base and next hashes plus the minimal removed
and inserted UTF-16 windows, and the Workpiece pane makes that replacement
summary visible.
Accept Petrinaut element IDs through a plugin-contributed selector, resolve
them to existing per-operation mutation-attempt tool-call IDs, and let generic
workpiece code map those target revisions to workpiece passages and session
turns. Keep the exact read_petrinaut/mutate_petrinaut family grouping and any
plugin package rename behind the topology decision.
Expose a current document revision ID on handles, retain IDs and canonical
patches in history entries, and report previous/current revisions on direct
changes, undo, redo and history navigation. Persisted hosts can supply the
initial revision ID on reopen, allowing Brunch to distinguish direct edits
from its own mutation attempts without inventing a parallel revision stream.
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.35%. Comparing base (fb728e4) to head (748ec3c).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #9667       +/-   ##
===========================================
- Coverage   65.90%   15.35%   -50.55%     
===========================================
  Files        1887      210     -1677     
  Lines      198443     6677   -191766     
  Branches     8248     1154     -7094     
===========================================
- Hits       130774     1025   -129749     
+ Misses      66139     5551    -60588     
+ Partials     1530      101     -1429     
Flag Coverage Δ
apps.hash-ai-worker-py ?
apps.hash-ai-worker-ts ?
apps.hash-api 15.35% <ø> (ø)
apps.hash-graph ?
backend-integration-tests ?
blockprotocol.type-system ?
deer ?
error-stack ?
local.claude-hooks ?
local.harpc-client ?
local.hash-backend-utils ?
local.hash-graph-sdk ?
local.hash-isomorphic-utils ?
local.hash-subgraph ?
rust.antsi ?
rust.deer ?
rust.error-stack ?
rust.harpc-codec ?
rust.harpc-net ?
rust.harpc-tower ?
rust.harpc-types ?
rust.harpc-wire-protocol ?
rust.hash-codec ?
rust.hash-config ?
rust.hash-graph-api ?
rust.hash-graph-atlas ?
rust.hash-graph-authentication ?
rust.hash-graph-authorization ?
rust.hash-graph-embeddings ?
rust.hash-graph-postgres-store ?
rust.hash-graph-store ?
rust.hash-graph-temporal-versioning ?
rust.hash-graph-types ?
rust.hash-graph-validation ?
rust.hash-middleware ?
rust.hashql-ast ?
rust.hashql-compiletest ?
rust.hashql-core ?
rust.hashql-diagnostics ?
rust.hashql-eval ?
rust.hashql-hir ?
rust.hashql-mir ?
rust.hashql-syntax-jexpr ?
rust.sarif ?
sarif ?
tests.hash-backend-integration ?
unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant