model-usage bed: prove the usage store end to end (ADR 0054) #15

Merged
jschoubben merged 1 commits from feat/usage-store into main 2026-09-07 02:08:24 +00:00
Owner

A VM bed: a postgres provider and the model-usage consumer on one node, the substrate on the other. A usage event injected into the mesh is upserted into model-usage's provisioned store, asserted at both grains, latest-per-key, and in the clear.

In build-module-runtime.sh, migrate/index.ts and pg.d.ts join the compiled entrypoint set so a module may carry a run-once entry and an ambient type declaration (model-usage uses the latter for the pg driver).

The bed surfaced and drove fixes elsewhere: a short module slug for the S3-key identity bound (ADR 0049), host-network containers getting the mesh's names (mesh-control PR), and injecting the event from a publisher rather than the pure-consumer store (whose account has no publish right by design). SUITE_EXIT=0.

A VM bed: a postgres provider and the model-usage consumer on one node, the substrate on the other. A usage event injected into the mesh is upserted into model-usage's provisioned store, asserted at both grains, latest-per-key, and in the clear. In `build-module-runtime.sh`, `migrate/index.ts` and `pg.d.ts` join the compiled entrypoint set so a module may carry a run-once entry and an ambient type declaration (model-usage uses the latter for the `pg` driver). The bed surfaced and drove fixes elsewhere: a short module slug for the S3-key identity bound (ADR 0049), host-network containers getting the mesh's names (mesh-control PR), and injecting the event from a publisher rather than the pure-consumer store (whose account has no publish right by design). SUITE_EXIT=0.
jschoubben added 1 commit 2026-09-07 02:08:13 +00:00
A VM bed: a postgres provider and the model-usage consumer on one node, the
substrate on the other. A usage event injected into the mesh is upserted into
model-usage's provisioned store, asserted at both grains, latest-per-key, and
in the clear.

Also, in build-module-runtime.sh, add migrate/index.ts and pg.d.ts to the
compiled entrypoint set so a module may carry a run-once entry and an ambient
type declaration (model-usage uses the latter for the pg driver).

The bed surfaced and drove several fixes elsewhere: a short module slug for the
S3-key identity bound (ADR 0049), host-network containers getting the mesh's
names (mesh-control), and injecting the event from a publisher rather than the
pure-consumer store (its account has no publish right by design).

Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
jschoubben merged commit 0513163119 into main 2026-09-07 02:08:24 +00:00
jschoubben deleted branch feat/usage-store 2026-09-07 02:08:25 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-lab#15