Skip to content

Sync Capability Inspector, generic collection pulls, Diagnostic Bundle, central logger#71

Merged
keyxmakerx merged 5 commits into
mainfrom
claude/chronicle-sheet-sync-j2m9s4
Jun 26, 2026
Merged

Sync Capability Inspector, generic collection pulls, Diagnostic Bundle, central logger#71
keyxmakerx merged 5 commits into
mainfrom
claude/chronicle-sheet-sync-j2m9s4

Conversation

@keyxmakerx

Copy link
Copy Markdown
Owner

Wave-1 "Foundry Sync Hub" debug cockpit + the data-pull engine (see the Cordinator master plan + deploy runbook).

  • 98ac0f6 Sync Capability Inspector engine — pure, tested: captureActorSnapshot (walks actor.system + items/effects + flags) + buildCapabilityReport (diffs against the system's declared field manifest → synced / mapped-missing / declared-unmapped / available-unmapped, flags collections) + markdown/JSON renderers.
  • 5fb4a7c capability panel on the dashboard Status tab — "Sync Capability" summary + gap list + Copy Report/JSON (mirrors copy-debug; auto-escaped).
  • 84936d2 generic collection extraction — the adapter now pulls embedded collections (actor.items[] → abilities/inventory/features) via manifest annotations (foundry_collection + foundry_item_type + foundry_item_fields), serialized to JSON. Read-only (excluded from write path). Pure helpers + tests.
  • 5b3de3a one-click Diagnostic Bundle — a copy-paste troubleshooting report (versions + health + sync status + field mapping + capability + recent logs). Pure builder + tests; "Copy Diagnostic Bundle" button on the Status tab.
  • 6c9a491 central leveled loggerscripts/logger.mjs (levels + ring buffer), captured into the Diagnostic Bundle; dashboard handlers are first adopters. Level-control UI deferred until adoption is broad (no no-op control).

Full suite 557/557 green. The three dashboard UI surfaces need a live Foundry smoke-test (ApplicationV2 UI is not headlessly testable — same caveat as the dialog migration); steps are in the runbook.

Next (needs live input): paste the Status tab → Sync Capability → Copy Report output to finish the Draw Steel pull mappings (backstory/abilities/inventory paths) — no guessing.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LaDDiXB5GTVurEzJwYYopf


Generated by Claude Code

claude added 5 commits June 26, 2026 14:46
… what DOES)

Wave 1 / WS-4 core. Pure, testable engine that diffs a live actor's full data
tree against the system's declared character-field manifest:
- captureActorSnapshot(actor): defensive — walks actor.system (via toObject),
  summarizes actor.items/effects collections + flags; never throws on a bad actor.
- buildCapabilityReport(snapshot, fieldDefs): pure — classifies each field as
  synced / mapped-missing / declared-unmapped / available-unmapped, and flags
  items/effects collections as available-but-not-yet-pullable (the WS-3 gap).
- renderCapabilityMarkdown/Json: copy-to-clipboard payloads (human + AI friendly).
Reuses the schema-walker + two-layer (collect/render) pattern from the calendar
diagnostics. 5 node:test cases, all green. UI wiring (dashboard panel + copy
buttons) lands next; this is the reusable core + the relay payload shape.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LaDDiXB5GTVurEzJwYYopf
…oard Status tab

Wires the WS-4 engine into the dashboard: samples a representative hero actor,
fetches its system character-fields, and renders a 'Sync Capability' panel showing
what CAN pull vs what DOES — synced / declared-unmapped / mapped-missing /
available-unmapped counts, an actionable gap list (incl. items/effects collections
flagged as the not-yet-pullable WS-3 work), and Copy Report (markdown) / Copy JSON
buttons. Mirrors the existing copy-debug action + clipboard pattern; all template
output auto-escaped.

Pure engine fully unit-tested (540/540 suite green incl. dashboard XSS + template
roots). UI render needs a live Foundry smoke-test (ApplicationV2 UI is not
headlessly testable — same caveat as the dialog migration).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LaDDiXB5GTVurEzJwYYopf
…y from actor.items[])

WS-3. The dot-path adapter could only read scalar actor.system fields, so embedded
documents (abilities, inventory, features in actor.items[]) never synced. Adds a
manifest-driven, system-agnostic collection mapping: a field with foundry_collection
(+ optional foundry_item_type filter + foundry_item_fields projection) extracts and
serializes the collection to JSON. Read-only today (excluded from the write path);
write-back is a future tier (foundry_writable preserved for scalars).

Refactored the extraction into pure exported helpers (getNestedValue,
extractCollectionField, buildChronicleFields) — 6 node:test cases, full suite 546/546.
DS-specific path mappings come next from the Capability Inspector's live output.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LaDDiXB5GTVurEzJwYYopf
…for troubleshooting)

Wave 1 debug cockpit. A pure builder assembles versions + connection/health +
per-resource sync status + field mapping + Sync Capability summary + recent
activity/error logs into one copy-paste Markdown report — the manual precursor to the
admin AI assist and the thing this project needed instead of multi-screenshot hunting.
Wired a 'Copy Diagnostic Bundle' button on the Status tab (mirrors copy-debug;
gathers from the same accessors the status tab uses). Pure builder fully unit-tested
(4 cases, tolerant of partial/garbage input); full suite green. UI render needs a live
Foundry smoke-test (ApplicationV2 not headlessly testable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LaDDiXB5GTVurEzJwYYopf
…ndle

Wave 1 debug cockpit. Adds scripts/logger.mjs: leveled logging (error<warn<info<debug
<trace, plus silent) gating console noise, with an always-on ring buffer (cap 500) so
recent messages export even when the console wasn't open. The Diagnostic Bundle now
includes the captured buffer; the dashboard's new capability/bundle handlers route
through log.* as the first adopters. Level CONTROL (UI/setting) is intentionally
deferred until enough call sites adopt the logger — shipping a no-op control would be
the kind of fake feature we're avoiding. 6 logger tests + bundle log-buffer test;
full suite 557/557.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LaDDiXB5GTVurEzJwYYopf
@keyxmakerx
keyxmakerx merged commit d62ac15 into main Jun 26, 2026
1 check passed
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.

2 participants