Skip to content

fix: add serde serialization to HolonNode#105

Open
elasticdotventures wants to merge 11 commits into
mainfrom
feat/b00t-holonnode-serde
Open

fix: add serde serialization to HolonNode#105
elasticdotventures wants to merge 11 commits into
mainfrom
feat/b00t-holonnode-serde

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Problem

HolonNode struct missing serde serialization support, blocking JSON deserialization in consuming crates.

Solution

  • Add serde::Deserialize and serde::Serialize derives to HolonNode
  • Add serde dependency with 'derive' feature to b00t-reflect-types crate

Context

Required for b00t PR #527 type_graph deserialization tests:

  • type_graph_handler returns Json<Vec>
  • Tests deserialize response: serde_json::from_slice(&body).unwrap()
  • Without Deserialize trait, compilation fails

Changes

  • crates/b00t-reflect-types/Cargo.toml: added serde dependency
  • crates/b00t-reflect-types/src/lib.rs: added serde derives to HolonNode

Verification

Resolves compilation errors in b00t-mcp type_graph.rs tests.

elasticdotventures and others added 11 commits May 14, 2026 11:47
- Comprehensive 42-test integration suite at tests/holon_viz_comprehensive.rs
  covering ProcessController, ImmutableActionLog, Holon, CytoscapeGraph,
  HtmlRenderer, emitters, TypeRelationshipGraph, VizObserver, full pipeline
- ledgrrr-viz-serve.py: HTTP + CDP-compatible server for viz dashboard
  (start/stop/status, /json/version + /json/list endpoints for VizObserver)
- Fix duplicate [dev-dependencies] in holon-viz/Cargo.toml
- Export CytoscapeNodeData and CytoscapeEdgeData from lib.rs
- Remove specta dep (nightly-only, not needed for core viz)
…ecipes

- Document module pattern header (canonical: when-to-use vs inline)
- Add viz, viz-stop, viz-status, viz-build recipes
- Add test (42 MECE suite), test-all recipes
- Add status recipe (repo/binary/running check)
- Fix install target path: ~/.cargo/bin -> ~/.local/bin
…442/6166/4217/IFRS-9 types (gh#511)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…au extensions (gh#513)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…(gh#514, gh#515)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…p fix (gh#516)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…govcraft integration)

- New crate: beankeeper-bridge — converts OFX StatementTransaction to balanced
  beankeeper Entry pairs via convert(txn, ConversionConfig) -> BridgeResult
- Uses PromptExecution/beankeeper-b00t fork (feat/serde-feature) — upstream PR #18
  open at Govcraft/beankeeper — so BridgeResult is directly Serialize with no DTO
- Workspace deps: beankeeper (git fork, serde feature) + ofx-rs hoisted to [workspace.dependencies]
- All bouncer MECE issues addressed:
  C1: fit_id in blake3 preimage — no same-day same-amount collision
  C3: debug_assert balance invariant enforced at BridgeResult::new()
  I1: chrono phantom dep removed
  I2: deps hoisted to workspace
  I4: BridgeResult directly Serialize (fork enabled this)
  I5: ConversionConfig struct replaces 6 positional params
- 9 tests: credit/debit direction, deterministic ID, C1 regression, zero-amount,
  minor-unit conversion, balance, direct JSON serialization

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ted_seed() (K2)

- New crate: b00t-reflect — #[proc_macro_derive(HolonEmit)] auto-emits
  TypeRelationshipGraph nodes from enum variants; zero manual maintenance
- New file: holon-viz/src/domain.rs — VizDomain enum (53 variants, #[holon(...)]
  annotations) replacing the hand-coded node list in generated_seed()
- generated_seed() DELETED from gen.rs; replaced with manifest_loader() that
  calls VizDomain::emit_nodes() — the type graph is now a build artifact
- HasVisualization impls added for 6 tax domain types previously missing:
  AuRdActivity, AuRdOffset (ITAA 1997 s.355-100), QreActivity, UsRdcCredit
  (IRC §41), CryptoTx, CryptoWallet (ATO QC 53725 / Rev. Proc. 2024-28)
- canonical_viz_dsl_map() extended to include all 6 tax types
- 42/42 holon-viz tests pass

IFR achieved: type graph auto-derives from code; flowchart generation and
interactive viz now read the same derived source. Zero hand-maintenance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ct-types

- Add crates/b00t-reflect-types: regular lib crate exporting HolonNode struct
  (companion crate pattern — serde/serde_derive — so proc-macro crate can emit
  the type while remaining re-exportable from b00t-cli and other consumers)
- b00t-reflect proc-macro now emits ::b00t_reflect_types::HolonNode (not an
  internal crate type), decoupling it from holon-viz internals
- holon-viz: TypeNode::from(HolonNode) updated to b00t_reflect_types::HolonNode
- holon-viz: manifest_loader() auto-derives nodes via VizDomain::emit_nodes()
- All 42 holon-viz tests green

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add serde::Deserialize and serde::Serialize derives
- Add serde dependency with 'derive' feature

Resolves PR #527 compilation errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant