nflow-architecture-spec / docs /SESSION_HANDOFF.md
krystv's picture
docs: Session 8 final β€” compile fixes, architecture diagram, expected test count
c32dab6 verified

nFlow Session 8 β€” Custom Node Creator (Final)

See krystv/nflow/docs/SESSION_HANDOFF.md for full details.

Compile Fixes Applied

Session 8 included a static analysis pass (no sandbox available) that identified and fixed:

  1. user_nodes.rs β€” removed unused imports at module level (Dim/Disclosure/DType)
  2. user_nodes.rs β€” _registry parameter renamed to suppress unused-variable warning
  3. user_nodes.rs β€” test make_passthrough_uc mut removed
  4. nfl.rs β€” removed unused UserCompositeStore import
  5. view.rs β€” removed invalid pub use ExecCoverageView as ExecCoverageViewAlias (compile error)
  6. view.rs β€” removed duplicate RunResultView2

Key Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  UserComposite (IR)                                         β”‚
β”‚  uid: "user.mamba_ssm"  colour: "#a855f7"                  β”‚
β”‚  ports_in/out, attrs, inner_graph: Graph                    β”‚
β”‚  paper_url: "https://arxiv.org/abs/2312.00752"              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ infer_user_composite()
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Session.run_inference               β”‚
    β”‚  op.starts_with("user.") β†’           β”‚
    β”‚  clone inner_graph + seed inputs +   β”‚
    β”‚  run inference + read output types   β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  redb (embedded database)            β”‚
    β”‚  global_nodes | recent_files |       β”‚
    β”‚  app_settings                        β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Expected Test Count After Sandbox

~187 total = 174 (before) + 5 (UserComposite IR) + 3 (redb) + 5 (user_nodes inference)

Next Priorities

  1. Sandbox compile verification
  2. Codegen lowering for user composites
  3. Double-click β†’ editor tab in Editor canvas
  4. CompositePropertiesPanel (port/attr schema editor)
  5. redb path using app_data_dir()
  6. npm build verification