Skip to content

Commit 93e9f5e

Browse files
Merge branch 'main' into feat/holonic-viz-sysml-owl2-cytoscape
Signed-off-by: Brian Horakh <35611074+elasticdotventures@users.noreply.github.com>
2 parents fe2d6f3 + 15b0601 commit 93e9f5e

11 files changed

Lines changed: 464 additions & 34 deletions

File tree

AGENTS.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,91 @@ Treat this as a standing operational gate, not a one-time migration task.
529529
> Profile not yet configured. Run `/gsd:profile-user` to generate your developer profile.
530530
> This section is managed by `generate-claude-profile` -- do not edit manually.
531531
<!-- GSD:profile-end -->
532+
### 2026-05-13: Context Exhaustion Post-Mortem — Delegation Failures
533+
534+
#### What Went Wrong
535+
536+
A long CI-gate + release session exhausted context without cutting a clean release. Root causes:
537+
538+
**1. Inline CI polling instead of background agents**
539+
The coordinator polled `gh run view` in a loop directly in the main context, consuming thousands of tokens on raw JSON and step-by-step output. Every `gh run view --json jobs` call pulled multi-KB payloads that were parsed and printed inline.
540+
541+
*Rule:* Any wait longer than one poll cycle must use `run_in_background: true` with an `until` loop, or delegate to a `general-purpose` subagent. Never poll CI inline more than twice in a single turn.
542+
543+
**2. Long-running commands (cargo test, just release) run inline**
544+
`just release minor` runs `cargo test --all-features` which takes 12+ minutes. Running it synchronously blocks the main context for the entire duration.
545+
546+
*Rule:* Any command that takes more than ~60 seconds must run with `run_in_background: true`. For release steps: delegate the entire release sequence (`just release minor`) to a `general-purpose` agent with the instruction to report pass/fail and the final git log.
547+
548+
**3. Code exploration with grep/Read instead of codebase-memory-mcp**
549+
The coordinator used `grep -rn`, `cat`, `wc -l`, and `sed -n` to survey existing crates and find test failures. Each call returned raw source in context. The structural survey of `rotel-visual`, `iso.rs`, `visualize.rs`, `ontology.rs` alone consumed ~8K tokens that codebase-memory-mcp would have answered in ~200 tokens.
550+
551+
*Rule:* NEVER use grep/Read/cat for structural queries (function defs, type shapes, callers, module structure). Use `codebase-memory-mcp` first. Use grep only for string literals and config values.
552+
553+
**4. Scaffolding delegation without full agent isolation**
554+
New crate scaffolding (`holon-viz`, `ledgerr-model-server`) was delegated to `rust-craftsman` — good — but the coordinator then re-read the output inline (`ls`, `cargo check`) and loaded the results into context. The verification step should be inside the agent prompt itself.
555+
556+
*Rule:* When delegating implementation to a subagent, include verification (`cargo check -p <crate>`) in the agent prompt. Trust the agent's completion report. Only inspect inline if the agent reports failure.
557+
558+
**5. Test fix done inline instead of delegated**
559+
Diagnosing and fixing `collect_datum_files` + `test_query_transactions_applies_sorting` was done step by step in main context. Each `cargo test -p ... --all-features` run took 20-50s and dumped compiler output inline.
560+
561+
*Rule:* Flaky or failing tests should be delegated to `rust-craftsman` with: (a) exact test name, (b) failure message, (c) file path and line number. The agent fixes and verifies. Report back.
562+
563+
#### Correct Pattern for CI-Gate + Release Sessions
564+
565+
```
566+
coordinator:
567+
1. push branch → background (git push)
568+
2. spawn general-purpose agent in background:
569+
"poll gh run view <run_id> every 60s until conclusion != null.
570+
report: conclusion, failing steps if any, run URL"
571+
3. do other work (feature planning, scaffolding) in foreground
572+
4. when agent reports CI green:
573+
spawn general-purpose agent (foreground):
574+
"on branch main: just release minor 2>&1
575+
report: pass/fail, version tag created, git log --oneline -3"
576+
5. switch to feature branch, continue work
577+
```
578+
579+
Never hold CI polling or multi-minute compilations in the coordinator context.
580+
581+
#### b00t Usage Rules
582+
583+
- `b00t` is **alphaware** — treat as test scaffolding only. Never make it a production release gate.
584+
- Do NOT add `b00t` deps to release-critical paths (`ledgerr-mcp`, `ledger-core`, CI steps).
585+
- b00t will consume `holon-viz` downstream for visualization/test animation. Not the other way.
586+
- `_b00t_/datums` may not exist in all environments. Tests gated on `real_datums` feature must gracefully skip (return early) when the dir is absent — never `unwrap()`.
587+
588+
#### Observer/Test Pattern for Viz UX (2026-05-13)
589+
590+
Established design for testing the `holon-viz` Cytoscape.js rendering layer:
591+
592+
```
593+
CytoscapeGraph (Rust) → HTML renderer → serve in Tauri WebView
594+
595+
CDP screenshot (port 19222, scripts/tauri-cdp-test.ps1)
596+
597+
scripts/tauri-vision-analyze.py --image <png> (Florence-2-base via uv)
598+
599+
VizObservation { caption, nodes_detected, edges_detected }
600+
601+
assert!(observation.matches(&expected_holon_spec))
602+
```
603+
604+
Two test tiers:
605+
- **Fast (no vision):** headless Cytoscape JSON round-trip via `chromiumoxide` — verify topology from serialized graph, not pixels. Inner loop.
606+
- **Slow (vision):** Florence-2-base screenshot analysis via CDP. Outer loop, requires Tauri host running. Triggered by `TAURI_TEST_SCREENSHOT_PATH` env var.
607+
608+
Florence-2 script: `scripts/tauri-vision-analyze.py`. Uses `uv run` — no Python env setup required.
609+
610+
#### Release Gate Status (2026-05-13)
611+
612+
- v1.9.0 blocked by flaky `test_query_transactions_applies_sorting` + `test_query_transactions_deterministic_ordering` in `ledgerr-mcp/tests/query_transactions_tests.rs`. These pass in isolation but fail under full parallel `--all-features` run. Likely non-deterministic sort under concurrent ingest. Fix: add deterministic tie-break (e.g., tx_id as secondary sort key) in `TurboLedgerService::query_transactions`.
613+
- Feature branch `feat/holonic-viz-sysml-owl2-cytoscape` is ahead of main with `holon-viz` + `ledgerr-model-server` scaffolded and compiling.
614+
615+
---
616+
532617
### 2026-05-09: PRD-10 Financial Pipeline Adversarial Agent Loop Session
533618

534619
#### Non-Obvious Lessons Learned

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,87 @@
22
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
33

44
- - -
5+
## v1.9.0 - 2026-05-13
6+
#### Bug Fixes
7+
- **(ci)** add GTK deps to Dockerfile, remove --all-features - (02fc48b) - Claude Sonnet (coordinator)
8+
- **(ci)** add feat/** to push branch trigger - (9bcf48a) - Claude Sonnet (coordinator)
9+
- **(ci)** remove --all-features, explict feature list, drop real_datums from CI - (3517129) - Claude Sonnet (coordinator)
10+
- **(ci)** replace --all-features with explicit feature list, skip real_datums in CI - (4917f80) - Claude Sonnet (coordinator)
11+
- **(ci)** checkout _b00t_ as sibling dir for include_str! path resolution - (f960b31) - Claude Sonnet (coordinator)
12+
- **(ci)** checkout _b00t_ repo for real_datums feature tests - (c92f32d) - Claude Sonnet (coordinator)
13+
- **(clippy)** zero warnings workspace-wide, remove handle_external_tool vestigial param - (5e634e4) - Claude Sonnet (coordinator)
14+
- **(clippy)** resolve all PR #71 review issues — unused imports, operator precedence, and_then→map - (dca1773) - Claude Sonnet (coordinator)
15+
- **(datum)** apply clippy autofix for vec_init_then_push and unused mut - (5b12fa6) - Claude Sonnet (coordinator)
16+
- **(docgen)** resolve all 8 documentation generation pipeline gaps - (106b60c) - Claude Sonnet (coordinator)
17+
- **(evidence)** address MECE review findings - (3e1cd28) - copilot-swe-agent[bot]
18+
- **(gitignore)** .b00t/scratch/ and .b00t/datums/*.txt ignored, loop writes to scratch - (d1134d7) - Claude Sonnet (coordinator)
19+
- **(ledger-core)** remove conflicting From impl in ingest.rs (#93) - (73d5250) - PromptExecution.com
20+
- **(mcp)** flatten schemars oneOf for Claude API input_schema compatibility (#83) - (898613e) - PromptExecution.com
21+
- **(mcp/contract)** bouncer follow-ups — atomic JSONL writes + conditional additionalProperties removal (#87) - (75fd8a4) - PromptExecution.com
22+
- **(prd9)** address code review feedback on cfg gates and dead code - (162affc) - copilot-swe-agent[bot]
23+
- **(prd9)** address compilation errors, shutdown gap, and visual narrative readiness gaps - (9770321) - copilot-swe-agent[bot]
24+
- **(review)** hardcoded SCCACHE_DIR path, indentation and SVG tspan in to_animated_svg - (be0523d) - copilot-swe-agent[bot]
25+
- **(rotel-visual)** resolve compilation errors — unclosed delimiters, shadowed identifiers - (96ecb94) - Claude Sonnet (coordinator)
26+
- **(rotel-visual)** address all review feedback from PR #65 - (e4baa7b) - copilot-swe-agent[bot]
27+
- **(sort)** add deterministic tx-id tie-break to apply_transaction_sort; add PRD handover doc - (af973b6) - Claude Sonnet (coordinator)
28+
- **(tauri)** functional panel UI with working navigation - (1655a66) - Claude Sonnet (coordinator)
29+
- **(tauri)** autorun with telemetry dump, 5s countdown then exit - (24067d4) - Claude Sonnet (coordinator)
30+
- **(tauri/evidence)** MECE review — 6 correctness, security and UX fixes - (719b165) - copilot-swe-agent[bot]
31+
- **(tauri/mece)** restore CSS, wire EvidenceState, fix dashboard command + XSS + auto-refresh - (efad326) - copilot-swe-agent[bot]
32+
- **(tauri/ui)** guard DASH_PANEL_INDEX != -1, use template literal for provider display - (3874f9f) - copilot-swe-agent[bot]
33+
- **(tests)** eliminate flaky sort test by using unique workbook paths per test - (46cbaa5) - Claude Sonnet (coordinator)
34+
- close 9 of 10 identified pipeline gaps (ops stubs, semantic matching) (#95) - (994b34c) - PromptExecution.com
35+
- address PR review feedback on ledgerr-focus and ledgerr-mcp - (b9a358c) - copilot-swe-agent[bot]
36+
- apply review feedback - doc comment, workbook headers, verify test - (5a44339) - copilot-swe-agent[bot]
37+
- apply reviewer feedback for lfmf-counter and ontology-extractor - (275a567) - copilot-swe-agent[bot]
38+
- RhaiDsl type errors in iso/iso_objects, merge conflict markers in iso.rs - (6554f0d) - Claude Sonnet (coordinator)
39+
#### Documentation
40+
- **(agents)** context exhaustion post-mortem + delegation rules - (3e509cc) - Claude Sonnet (coordinator)
41+
- **(release)** odd/even minor version policy + Justfile enforcement (#49) - (49c9ff7) - PromptExecution.com
42+
- session learning — force-push guard, generated panel pattern, evidence graph - (1800f14) - Claude Sonnet (coordinator)
43+
#### Features
44+
- **(cdp)** CDP automation harness, clean-build, test scripts - (9d095c6) - Claude Sonnet (coordinator)
45+
- **(cdp)** enable WebView2 remote debugging via env var - (9c74c1a) - Claude Sonnet (coordinator)
46+
- **(dashboard)** generated panels, b00t handshake, UI hardening (#81) - (1d8588f) - PromptExecution.com
47+
- **(evidence)** wire arc-kit-au evidence graph into MCP query tools - (b5adf44) - Claude Sonnet (coordinator)
48+
- **(holon-viz)** scaffold holonic viz engine + model server stub - (e34d982) - Claude Sonnet (coordinator)
49+
- **(ledgerr-mcp)** PRD-10 financial pipeline + MCP gaps #24 #25 #26 (#89) - (d5eb2e7) - PromptExecution.com
50+
- **(mdbook-rhai-mermaid)** expose parser and emitter as library - (74bf80a) - brianh
51+
- **(prd-6-future)** ledger-attest proc-macro crate — #[attested] lint skeleton (#59) (#94) - (5da2f0a) - PromptExecution.com
52+
- **(prd-7)** materialize AUDIT.log sheet — AuditRow, 9 columns, MetaFlag Display (#57) (#92) - (0539143) - PromptExecution.com
53+
- **(prd-7)** populate TransactionFacts from PipelineState doc_fields (#55) (#90) - (d624be4) - PromptExecution.com
54+
- **(prd-8)** Kani harness crate + CI — InvoiceConstraintSolver, VendorConstraintSet, CommitGate (#56) (#91) - (53debf5) - PromptExecution.com
55+
- **(prd9)** add docs UI scaffolding with isometric canvas and vite config - (27cf983) - Claude Sonnet (coordinator)
56+
- **(prd9)** add VizManifest/VizSpecOwned types and xtask export command - (41f251f) - Claude Sonnet (coordinator)
57+
- **(rotel)** OTel journal surface — embedded collector, log-shape classifier, visual dashboard - (bc1a8e1) - Brian H
58+
- **(rotel-visual)** end-to-end OTLP ingestion → classification → visualization pipeline - (be90a67) - Brian H
59+
- **(tauri)** baked build counter, release build + MSI install - (ecf928d) - Claude Sonnet (coordinator)
60+
- **(tauri)** test loop with monotonic build counter, DOM versioning - (ac86b41) - Claude Sonnet (coordinator)
61+
- **(tauri)** version titlebar with build counter from harness - (9b773e0) - Claude Sonnet (coordinator)
62+
- **(tauri)** local vision analysis with Florence-2-base - (853a193) - Claude Sonnet (coordinator)
63+
- **(tauri)** countdown footer, screenshot capture, full SLO trace - (1c7b8a2) - Claude Sonnet (coordinator)
64+
- **(tauri)** test harness with UUID signal path, 3x kill redundancy, SLO trace - (30b67fd) - Claude Sonnet (coordinator)
65+
- **(tauri)** merge host-tauri into ledgerr-host, replace Slint as desktop host - (e582b91) - Claude Sonnet (coordinator)
66+
- **(tauri)** rename binary to ledgrrr, install via MSI with admin elevation - (d28c0d2) - Claude Sonnet (coordinator)
67+
- **(tauri)** build script with pre-flight check, hash signing, datum TOML - (a8c23ae) - Claude Sonnet (coordinator)
68+
- **(tauri)** generated panels + EvidenceState dashboard - (13dd370) - Claude Sonnet (coordinator)
69+
- **(tauri)** surface EvidenceState/TodayQueue in Dashboard panel - (240d6b0) - Claude Sonnet (coordinator)
70+
- **(wrkflw)** add local docgen visualization pipeline test workflow - (e0652a1) - Claude Sonnet (coordinator)
71+
- ledgerr-focus FOCUS v1.3 crate, ledgerr_focus MCP tool, Dockerfile, workspace registration - (1573711) - brianh
72+
- checkpoint workspace core updates - (f82a938) - Brian H
73+
- add lfmf and ontology tooling - (54ca266) - Brian H
74+
#### Miscellaneous Chores
75+
- **(lockfile)** sync rotel-visual version to 1.8.1 - (ac40309) - brianh
76+
- **(rustfmt)** apply rustfmt across workspace - (a56ec94) - Claude Sonnet (coordinator)
77+
#### Performance Improvements
78+
- use sort_unstable_by in extract_rust_idioms - (63e3200) - copilot-swe-agent[bot]
79+
#### Refactoring
80+
- **(otel)** idiomatic abstractions, self-telemetry, SARIF SLO wiring - (76ea89d) - Brian H
81+
#### Tests
82+
- avoid persisting lfmf counters in doctests - (8f00edc) - Brian H
83+
84+
- - -
85+
586
## v1.8.1 - 2026-05-02
687
#### Features
788
- (**b00t-iface**) SARIF module enhancements and ralph stub - (27cabfa) - Claude Sonnet (coordinator), *Claude Sonnet 4.6*

Cargo.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ members = [
2525
resolver = "2"
2626

2727
[workspace.package]
28-
version = "1.8.1"
28+
version = "1.9.0"
2929
edition = "2021"
3030
license = "MIT"
3131

0 commit comments

Comments
 (0)