Skip to content

BUG: deployed amico verb-router bundle goes stale — nothing rebuilds the dist on upgrade #643

Description

@aarontrowbridge

Important

Problem — The deployed amico verb-router bundle on the server went 46 days stale (built Jul 15) while its source moved a month ahead: the ledger verbs shipped in source were absent from the deployed binary, so every ledger call on that machine silently degraded to "no ledger history" — for weeks, with no signal anywhere. Compounding it: nothing in CI builds this bundle (a broken entry or unresolvable import would pass CI green), and a stale checkout that skips install can't even build it locally.
Approach — Make bundle staleness structurally impossible: (1) a CI lane that builds all three bundles from current source on every push, failing on any broken entry or unresolvable import; (2) hook the bundle build into the existing upgrade path (the upgrade-receipt server-binary machinery) so every deployed upgrade refreshes the dists and writes a receipt — deployed freshness must not depend on whoever last ran a local build. Also fix the module-type warning on the extension-side bundle copy (ESM bundle under a package.json without a module type — every invocation pays a reparse).
Scope — in: CI build lane, upgrade-path rebuild hook + receipt, the module-type cosmetic · out: the verb surface, launcher scripts, bundle contents.

Acceptance Criteria

  • CI builds all three bundles from source and fails on a broken entry or unresolvable import
  • The upgrade path rebuilds + deploys the dists with a receipt (a deployed upgrade can no longer leave a stale verb router behind)
  • Invoking the extension-side bundle emits no module-type reparse warning

Testing Decisions

Extend the existing packaging/upgrade test suites for the rebuild-hook receipt; the CI build lane mirrors the vsix-gate's job pattern rather than inventing a new one.

Prior Art

The upgrade-receipt machinery (server-binary upgrade lane + receipts journal) is the hook to extend; the esbuild config builds all three bundles in one pass and is the build entry.

Notes

Evidence 2026-08-30, skill-health campaign (session-20260830-skill-health §7): deployed bundle predated the ledger verbs; amico ledger answered "unknown verb" for weeks; zero ledger references in the stale bundle vs 81 in a fresh build of identical source. Dists refreshed by ops 2026-08-30 (rebuild + both-copy deploy + PATH verify); this issue is the systemic follow-through. Part of the skill-health campaign, Phase 0.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    afkImplementable without human interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions