feat: BOM auto-extraction from Assembly links + manifest field population #282

Merged
forbes merged 1 commits from feat/bom-sync-and-manifest into main 2026-02-19 20:23:25 +00:00
Owner

Summary

Implements #276 (Phase 1) and #277.

BOM auto-extraction (#276)

New bom_sync.py module in mods/silo/freecad/ that:

  • Walks Assembly::AssemblyObject.Group for cross-document App::Link objects
  • Counts quantities from ElementCount (link arrays) and individual links
  • Resolves SiloItemId UUIDs to part numbers via get_item_by_uuid()
  • Diffs local assembly BOM against server BOM
  • Applies adds and quantity updates via individual CRUD calls
  • Never auto-deletes removed entries (warns only)

Hooked into Silo_Save and Silo_Commit via _push_bom_after_upload() following the same non-blocking pattern as DAG sync.

SSE bom.merged signal added to SiloEventListener with Activity pane handler.

merge_bom_json() added to SiloClient (forward-looking for Phase 2 server endpoint).

Manifest field population (#277)

  • silo_instance: populated from Silo API URL (stripped to base) on every .kc save
  • part_uuid: synced from SiloItemId on the tracked object (replaces random UUID)
  • revision_hash: written post-upload with the revision number from server response

New update_manifest_fields() public API in kc_format.py for post-save manifest updates.

Documentation fixes

  • KNOWN_ISSUES.md: corrected #6 (datum handling), resolved #10 and #11, fixed stale references, updated next steps
  • INTEGRATION_PLAN.md: corrected ztools SDK migration claim

Submodule branches

  • mods/silo -> feat/bom-sync-and-manifest
  • mods/silo/silo-client -> feat/bom-sync-and-manifest
## Summary Implements #276 (Phase 1) and #277. ### BOM auto-extraction (#276) New `bom_sync.py` module in `mods/silo/freecad/` that: - Walks `Assembly::AssemblyObject.Group` for cross-document `App::Link` objects - Counts quantities from `ElementCount` (link arrays) and individual links - Resolves `SiloItemId` UUIDs to part numbers via `get_item_by_uuid()` - Diffs local assembly BOM against server BOM - Applies adds and quantity updates via individual CRUD calls - **Never auto-deletes** removed entries (warns only) Hooked into `Silo_Save` and `Silo_Commit` via `_push_bom_after_upload()` following the same non-blocking pattern as DAG sync. SSE `bom.merged` signal added to `SiloEventListener` with Activity pane handler. `merge_bom_json()` added to SiloClient (forward-looking for Phase 2 server endpoint). ### Manifest field population (#277) - **`silo_instance`**: populated from Silo API URL (stripped to base) on every .kc save - **`part_uuid`**: synced from `SiloItemId` on the tracked object (replaces random UUID) - **`revision_hash`**: written post-upload with the revision number from server response New `update_manifest_fields()` public API in `kc_format.py` for post-save manifest updates. ### Documentation fixes - KNOWN_ISSUES.md: corrected #6 (datum handling), resolved #10 and #11, fixed stale references, updated next steps - INTEGRATION_PLAN.md: corrected ztools SDK migration claim ### Submodule branches - `mods/silo` -> `feat/bom-sync-and-manifest` - `mods/silo/silo-client` -> `feat/bom-sync-and-manifest`
forbes added 1 commit 2026-02-19 18:37:58 +00:00
feat: BOM auto-extraction and manifest field population (#276, #277)
All checks were successful
Build and Test / build (pull_request) Successful in 29m22s
0bc03ea421
Documentation updates:
- KNOWN_ISSUES.md: correct #6 (datum handling), resolve #10
  (delete_bom_entry) and #11 (silo icons), fix stale formatDate
  reference, mark completed next steps, add new next steps.
- INTEGRATION_PLAN.md: correct ztools SDK migration claim.

kc_format.py (#277):
- New _manifest_enrich_hook: populates part_uuid from SiloItemId and
  silo_instance from Silo API URL on every .kc save.
- New update_manifest_fields(): public API to update manifest fields
  in an already-saved .kc ZIP (used for post-upload revision_hash).

mods/silo submodule (#276):
- New bom_sync.py extraction engine.
- Post-commit hooks for BOM sync and manifest revision update.
- SSE bom_merged signal + Activity pane handler.
- merge_bom_json client method (forward-looking).

Refs: #276, #277
forbes merged commit 7fe046379b into main 2026-02-19 20:23:25 +00:00
forbes deleted branch feat/bom-sync-and-manifest 2026-02-19 20:23:25 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#282