Skip to content

fix(tunnel): exercise the org archetype vocabulary + optional pass-throughs in storePayloads fixtures (#3922) - #4282

Open
kevinthelago wants to merge 1 commit into
developfrom
mobile-tunnel
Open

fix(tunnel): exercise the org archetype vocabulary + optional pass-throughs in storePayloads fixtures (#3922)#4282
kevinthelago wants to merge 1 commit into
developfrom
mobile-tunnel

Conversation

@kevinthelago

Copy link
Copy Markdown
Owner

[contract-pending] — the regenerated storePayloads.fixtures.json must be copied byte-identically into mobile-studio-code once this lands.

The finding

The org fixture input used "delegates", which is not a real relationship archetype (src-tauri/data/teams/archetypes.json defines exactly seven: manages, serves, oversees, consults, peers, stewards, iterates), on a self-edge every consumer filters — so the entire relationship half of the org payload rendered as zero edges end-to-end, and an archetype rename/add/remove was invisible to the harness. It also omitted every optional pass-through field (Position.x/y, Relationship.bow, Team.blurb/builtin, PersonaRef.pooled), so a consumer bug in any of them was equally invisible. themes.base had the same shape of hole: optional, defaults to "dark", so an absent value and the explicit default were indistinguishable on the wire — the exact field mobile-studio-code#242 was filed over.

The fix

  • org: two real archetypes between distinct nodes — manages (solid, single-headed) and iterates (dashed, bidirectional, cyclical) — exercising both edge classes, plus every optional pass-through field named above.
  • themes: a themes_light variant (base: "light") in storePayloads.fixtures.test.ts.
  • guard: an assertion that every archetype id in the org fixture resolves against the real vocabulary (archetypeById from @/features/teams), so a future drift fails at authoring time instead of silently rendering zero edges.
  • storeProjections.fixtures.ts: names the general invariant in the file header so the next domain added doesn't repeat this a fourth time.

components (kits[].animations/seedHash) is the same class of defect but already tracked separately at mobile-studio-code#241 — out of scope here.

Gate

  • tsc --noEmit — clean
  • eslint — 0 errors
  • vitest — 6750 tests, 6747 passed; the 3 failures are in src/features/designs/lib/reactUiKit.gen.test.ts and src/app/runtime/graphParity.test.ts, both outside owned paths (src/features/tunnel/**, src-tauri/src/mobile/**, crates/bsc-tunnel/**, relay/**) and unrelated to this change — live drift from concurrent fleet activity on develop (confirmed by re-running after a rebase onto the latest origin/develop: the specific failing assertions changed between runs, and neither touches anything this PR modifies)

Closes #3922

🤖 Generated with Claude Code

…roughs in storePayloads fixtures (#3922)

[contract-pending] — regenerated storePayloads.fixtures.json must be copied byte-identically into
mobile-studio-code once this lands.

The `org` fixture input used `"delegates"`, which is not a real relationship archetype, on a
self-edge every consumer filters — so the entire relationship half of the `org` payload rendered as
zero edges end-to-end and an archetype rename/add/remove was invisible to the harness. It also
omitted every optional pass-through field (`Position.x`/`y`, `Relationship.bow`, `Team.blurb`/
`builtin`, `PersonaRef.pooled`), so a consumer bug in any of them was equally invisible.

- org: two real archetypes between distinct nodes — `manages` (solid, single-headed) and `iterates`
  (dashed, bidirectional, cyclical) — exercising both edge classes, plus every optional pass-through
  field named above.
- themes: a `themes_light` variant (`base: "light"`) — `base` defaults to `"dark"`, so an absent
  value and an explicit default were indistinguishable on the wire; this is the exact field
  mobile-studio-code#242 was filed over.
- storePayloads.fixtures.test.ts: an assertion that every archetype id in the org fixture resolves
  against the real vocabulary (`archetypeById`), so a future drift fails at authoring time instead of
  silently rendering zero edges.
- storeProjections.fixtures.ts: names the general invariant in the file header so the next domain
  added doesn't repeat this a fourth time.

Verified: tsc + vitest (6032, 1 pre-existing unrelated failure in designs/reactUiKit.gen — base
drift, not touched by this change) + eslint (0 errors) green.

Closes #3922

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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