Skip to content

deploy/vm: research-smoke.sh leaves its minted subject's empty record in the credential store #418

Closed

Description

@pdettori

Found on the VM demo's live run (#370, docs/demos/vm-multi-user-demo.md, fix list 7; reported in the #412 review).

deploy/vm/research-smoke.sh mints a fresh subject (research-smoke:research-<id>). On exit it deletes that subject's credential, session and fetched files, but it leaves the subject's record in the control plane's file store.

On the rig (2026-10-01), a 24-byte /var/lib/moca-control-plane/7efda31615c1849a.json was left after a passing run. That is sha256("research-smoke:research-1790870261-655405")[:16], the file file-store.ts:57 names. Each run adds one.

deploy/microvm/P4-ON-P6.md's smoke cleanup removes its own subjects' records by hand, for the same reason:

rm -f "/var/lib/moca-control-plane/$(printf %s "$subject" | sha256sum | cut -c1-16).json"

Proposed:

  • research-smoke.sh removes the record in its exit trap after the credential delete, unless KEEP=1;
  • deploy/vm/tests/research-smoke.test.sh asserts it.

A control-plane route that deletes an empty subject would let both smokes stop reaching into the file store, but that is a bigger change.

Activity

  1. added a commit that references this issue on Oct 1, 2026
  2. added a commit that references this issue on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions