identity-rows: anchorSaid falls back to op.name → poll of group.registry.<regk> 404s #1001

Closed
opened 2026-08-29 21:21:42 +00:00 by matou-build-agent · 2 comments

The failure

The drive reached founded green and died on the last leg. verdict.json:

{"verdict": "red", "firstRedLeg": "identity-rows", "legs": {"total": 13, "green": 12, "red": 1, "skip": 0}}

This is NOT the known own-VPS carrier frontier. pair is green ({"leg": "pair", "status": "green", "ms": 106}) and legs.json carries "skip": 0 — no leg on this drive names a skip reason, so there is no out-of-scope escape hatch covering this red. It is a new, real defect, one leg past the witness fault the previous healer commit (6ff3efe0) fixed.

legs.json / journey.json, the your-membership row:

identity row your-membership failed: HTTP GET /operations/group.registry.EM2E3nWo7Tz3w6ep3h0A1crfIU_u0A40OQddiFVaiy_B - 404  - {"title": "long running operation 'group.registry.EM2E3nWo7Tz3w6ep3h0A1crfIU_u0A40OQddiFVaiy_B' not found"}

That operation name is malformed. KERIA names long-running ops f"{type}.{oid}" (longrunning.py:188), so a registry op is registry.<regk> and a group op is group.<ixnSaid>. group.registry.<regk> is neither — the client concatenated two op names.

Not infra — the box is healthy

The live box (still up, read-only) rules out every environmental explanation:

  • systemctl --failed --no-legend → empty.
  • KERIA never restarted, so this is not lost in-memory op state: Main PID: 1223, Active: active (running) since Sat 2026-08-29 21:04:23 UTC, and the only lifecycle line in journalctl -u keria is the single Started KERIA identity agent server (IDIP, ADR 0196). at 21:04:23. The red landed ~21:07.
  • The witness fix from 6ff3efe0 held — ss -tlnp shows 0.0.0.0:5642 users:((".kli-wrapped",pid=1055)), and droplet-keri.txt has Witness wit : BHk5tFtukDpRyJ9DXIbYEuzpLYbxC2EyzfiaX_691CqI plus KERIA_IURLS=http://127.0.0.1:5642/oobi/BHk5.../controller.
  • The founder mint completed: Aug 29 21:07:02 gateway keria[1223]: Agent Pre: EFqig2THL2y86E4aZYm0FVd08hhQOoLnKkkvqMVHeomr, Controller: EKDAzstb-nQppayqlrjpNuLPfjwyhxfOr2gcoWE1dF-D.

Suspected layer: product (app client code)

app/src/lib/keri/client.ts:712-716:

private anchorSaid(op: KeriaOp): string {
  const meta = op.metadata ?? {};
  const said = (meta.said ?? meta.d ?? meta.anc) as string | undefined;
  return said ?? op.name.replace(/^group\./, '');
}

createRegistry (client.ts:306-315) feeds it straight into the anchor poller:

await this.waitOp(op, TIMEOUT.registry);
if (await this.isGroup(name)) {
  await this.awaitGroupAnchorWitnessed(this.anchorSaid(op), 'registry');
}

and awaitGroupAnchorWitnessed (client.ts:535) prepends the prefix:

const op = await this.sig().operations().get(`group.${ixnSaid}`);

The fallback is correct for group AID ops — identifiers().create/rotate submit OpTypes.group (aiding.py:1145, :1216), so op.name really is group.<ixnSaid> and stripping the prefix yields the SAID. It is wrong for registry ops, and nothing supplies the metadata that would avoid the fallback. Read off the running KERIA 0.4.0 on the box, credentialing.py:413:

op = agent.monitor.submit(
    registry.regk,
    longrunning.OpTypes.registry,
    metadata=dict(pre=hab.kever.prefixer.qb64, anchor=anchor, depends=op),
)

The metadata keys are pre, anchor, depends — no said, no d, no anc. So all three reads are undefined, control falls to op.name.replace(/^group\./, ''), the regex finds no group. prefix to strip on a name of registry.EM2E3nWo…, and it returns the op name verbatim. awaitGroupAnchorWitnessed then prepends group. → GET /operations/group.registry.EM2E3nWo… → 404, thrown on the first poll iteration (the loop has no error handling), which matches the leg's short "ms": 7612.

The registry itself was created fine — waitOp on the correctly-named registry.<regk> op passed. Only the group-anchor confirmation poll is broken.

What plugging it needs

The value the poller wants is already in the metadata KERIA returns. credentialing.py:398-400 builds the group anchor op first (op = self.identifierResource.interact(agent, name, body), i.e. the group.<ixnSaid> op) and embeds it as depends. So:

  1. Teach anchorSaid KERIA's real metadata shape — prefer op.metadata.depends (its .name is already the fully-qualified group.<ixnSaid>; its .oid is the bare ixn SAID) before falling back to op.name.
  2. Harden the fallback so it can never emit a name for a different op type: only strip-and-reuse op.name when it actually starts with group., otherwise throw a named error rather than fabricating group.registry.….
  3. Fix the next domino in the same change. issueCredential (client.ts:371) calls the identical anchorSaid(op) path, and KERIA's credential op metadata is metadata=dict(ced=creder.sad, depends=op) (credentialing.py:967) — also no said/d/anc. Once the registry poll is fixed, the very next call in the your-membership leg will fail the same way with group.credential.<said> 404. Both sites need the depends read.
  4. Add the regression fixture that would have caught it. Nothing under app/tests/ constructs an op metadata object at all (grep for metadata across app/tests/unit/keri/, komitiCredentials.test.ts, stewardApprove.test.ts returns nothing) — the fakes stub around the anchor gate, so anchorSaid's metadata branch is untested. Add fake ops whose metadata mirrors KERIA 0.4.0 verbatim ({pre, anchor, depends} for registry, {ced, depends} for credential, group.<said> naming for AID ops) and assert the polled op name for each.

Records read

artifacts/legs.json, artifacts/verdict.json, artifacts/journey.json, artifacts/host.json, artifacts/.last-run.json, artifacts/legs/*.png, and logs/ (droplet-keri.txt, droplet-units.txt, droplet-caddy.txt, droplet-stall.txt, founding-state.log, broker-journal.txt, cert-reseed.txt, qemu.log, state-logs.log).

Absent / empty, none of it load-bearing here: logs/helper.log and logs/reporter-claude.err are zero-byte; every guest-*.log is a stub (the guest is a droplet, not a QEMU VM — host.json records "qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT" and guest-journal.log is -- No entries --); logs/state-logs.log records ERROR: no state logs directory at …/state/logs; logs/broker-journal.txt harvested nothing (ssh: connect to host 100.98.48.68 port 22: Connection timed out) — which that file itself notes is by design off the admin mesh (ADR 0208, #681) and does not bear on the verdict. droplet-journal.txt has no KERIA-side error for this fault, consistent with the defect being client-side: KERIA correctly answered 404 to a name that does not exist.

drive 20260829T205854Z red at identity-rows: identity row your-membership failed: HTTP GET /operations/group.registry.EM2E3nWo7Tz3w6ep3h0A1crfIU_u0A40OQddiFVaiy_B - 404 - {"title": "long running operation 'group.registry.EM2E3nWo7Tz3w6ep3h0A1crf
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260829T205854Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure The drive reached `founded` green and died on the last leg. `verdict.json`: ```json {"verdict": "red", "firstRedLeg": "identity-rows", "legs": {"total": 13, "green": 12, "red": 1, "skip": 0}} ``` **This is NOT the known own-VPS carrier frontier.** `pair` is green (`{"leg": "pair", "status": "green", "ms": 106}`) and `legs.json` carries `"skip": 0` — no leg on this drive names a skip reason, so there is no out-of-scope escape hatch covering this red. It is a new, real defect, one leg past the witness fault the previous healer commit (`6ff3efe0`) fixed. `legs.json` / `journey.json`, the `your-membership` row: ``` identity row your-membership failed: HTTP GET /operations/group.registry.EM2E3nWo7Tz3w6ep3h0A1crfIU_u0A40OQddiFVaiy_B - 404 - {"title": "long running operation 'group.registry.EM2E3nWo7Tz3w6ep3h0A1crfIU_u0A40OQddiFVaiy_B' not found"} ``` That operation name is malformed. KERIA names long-running ops `f"{type}.{oid}"` (`longrunning.py:188`), so a registry op is `registry.<regk>` and a group op is `group.<ixnSaid>`. `group.registry.<regk>` is neither — the client concatenated two op names. ## Not infra — the box is healthy The live box (still up, read-only) rules out every environmental explanation: - `systemctl --failed --no-legend` → **empty**. - KERIA never restarted, so this is not lost in-memory op state: `Main PID: 1223`, `Active: active (running) since Sat 2026-08-29 21:04:23 UTC`, and the only lifecycle line in `journalctl -u keria` is the single `Started KERIA identity agent server (IDIP, ADR 0196).` at 21:04:23. The red landed ~21:07. - The witness fix from `6ff3efe0` held — `ss -tlnp` shows `0.0.0.0:5642 users:((".kli-wrapped",pid=1055))`, and `droplet-keri.txt` has `Witness wit : BHk5tFtukDpRyJ9DXIbYEuzpLYbxC2EyzfiaX_691CqI` plus `KERIA_IURLS=http://127.0.0.1:5642/oobi/BHk5.../controller`. - The founder mint completed: `Aug 29 21:07:02 gateway keria[1223]: Agent Pre: EFqig2THL2y86E4aZYm0FVd08hhQOoLnKkkvqMVHeomr, Controller: EKDAzstb-nQppayqlrjpNuLPfjwyhxfOr2gcoWE1dF-D`. ## Suspected layer: **product** (app client code) `app/src/lib/keri/client.ts:712-716`: ```ts private anchorSaid(op: KeriaOp): string { const meta = op.metadata ?? {}; const said = (meta.said ?? meta.d ?? meta.anc) as string | undefined; return said ?? op.name.replace(/^group\./, ''); } ``` `createRegistry` (`client.ts:306-315`) feeds it straight into the anchor poller: ```ts await this.waitOp(op, TIMEOUT.registry); if (await this.isGroup(name)) { await this.awaitGroupAnchorWitnessed(this.anchorSaid(op), 'registry'); } ``` and `awaitGroupAnchorWitnessed` (`client.ts:535`) prepends the prefix: ```ts const op = await this.sig().operations().get(`group.${ixnSaid}`); ``` The fallback is **correct for group AID ops** — `identifiers().create`/`rotate` submit `OpTypes.group` (`aiding.py:1145`, `:1216`), so `op.name` really is `group.<ixnSaid>` and stripping the prefix yields the SAID. It is **wrong for registry ops**, and nothing supplies the metadata that would avoid the fallback. Read off the running KERIA 0.4.0 on the box, `credentialing.py:413`: ```python op = agent.monitor.submit( registry.regk, longrunning.OpTypes.registry, metadata=dict(pre=hab.kever.prefixer.qb64, anchor=anchor, depends=op), ) ``` The metadata keys are `pre`, `anchor`, `depends` — **no `said`, no `d`, no `anc`**. So all three reads are `undefined`, control falls to `op.name.replace(/^group\./, '')`, the regex finds no `group.` prefix to strip on a name of `registry.EM2E3nWo…`, and it returns the op name verbatim. `awaitGroupAnchorWitnessed` then prepends `group.` → `GET /operations/group.registry.EM2E3nWo…` → 404, thrown on the first poll iteration (the loop has no error handling), which matches the leg's short `"ms": 7612`. The registry itself was created fine — `waitOp` on the correctly-named `registry.<regk>` op passed. Only the group-anchor confirmation poll is broken. ## What plugging it needs The value the poller wants is already in the metadata KERIA returns. `credentialing.py:398-400` builds the group anchor op first (`op = self.identifierResource.interact(agent, name, body)`, i.e. the `group.<ixnSaid>` op) and embeds it as `depends`. So: 1. Teach `anchorSaid` KERIA's real metadata shape — prefer `op.metadata.depends` (its `.name` is already the fully-qualified `group.<ixnSaid>`; its `.oid` is the bare ixn SAID) before falling back to `op.name`. 2. Harden the fallback so it can never emit a name for a different op type: only strip-and-reuse `op.name` when it actually starts with `group.`, otherwise throw a named error rather than fabricating `group.registry.…`. 3. **Fix the next domino in the same change.** `issueCredential` (`client.ts:371`) calls the identical `anchorSaid(op)` path, and KERIA's credential op metadata is `metadata=dict(ced=creder.sad, depends=op)` (`credentialing.py:967`) — also no `said`/`d`/`anc`. Once the registry poll is fixed, the very next call in the `your-membership` leg will fail the same way with `group.credential.<said>` 404. Both sites need the `depends` read. 4. **Add the regression fixture that would have caught it.** Nothing under `app/tests/` constructs an op `metadata` object at all (grep for `metadata` across `app/tests/unit/keri/`, `komitiCredentials.test.ts`, `stewardApprove.test.ts` returns nothing) — the fakes stub around the anchor gate, so `anchorSaid`'s metadata branch is untested. Add fake ops whose metadata mirrors KERIA 0.4.0 verbatim (`{pre, anchor, depends}` for registry, `{ced, depends}` for credential, `group.<said>` naming for AID ops) and assert the polled op name for each. ## Records read `artifacts/legs.json`, `artifacts/verdict.json`, `artifacts/journey.json`, `artifacts/host.json`, `artifacts/.last-run.json`, `artifacts/legs/*.png`, and `logs/` (`droplet-keri.txt`, `droplet-units.txt`, `droplet-caddy.txt`, `droplet-stall.txt`, `founding-state.log`, `broker-journal.txt`, `cert-reseed.txt`, `qemu.log`, `state-logs.log`). **Absent / empty, none of it load-bearing here:** `logs/helper.log` and `logs/reporter-claude.err` are zero-byte; every `guest-*.log` is a stub (the guest is a droplet, not a QEMU VM — `host.json` records `"qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT"` and `guest-journal.log` is `-- No entries --`); `logs/state-logs.log` records `ERROR: no state logs directory at …/state/logs`; `logs/broker-journal.txt` harvested nothing (`ssh: connect to host 100.98.48.68 port 22: Connection timed out`) — which that file itself notes is by design off the admin mesh (ADR 0208, #681) and does not bear on the verdict. `droplet-journal.txt` has no KERIA-side error for this fault, consistent with the defect being client-side: KERIA correctly answered 404 to a name that does not exist. drive `20260829T205854Z` red at `identity-rows`: `identity row your-membership failed: HTTP GET /operations/group.registry.EM2E3nWo7Tz3w6ep3h0A1crfIU_u0A40OQddiFVaiy_B - 404 - {"title": "long running operation 'group.registry.EM2E3nWo7Tz3w6ep3h0A1crf` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260829T205854Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: facdb1c80cf1 -->
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=14091
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=14091 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1001 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1001,
  "status": "success",
  "commits": [
    "f228e1d"
  ],
  "changed_files": [
    "app/src/lib/keri/client.ts",
    "app/tests/unit/keri/anchorPoll.test.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/unit/keri/anchorPoll.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/unit/keri/ tests/unit/identityLegs.test.ts tests/unit/komitiCredentials.test.ts tests/unit/stewardApprove.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "anchorSaid prefers KERIA's metadata.depends (group.<ixnSaid> / bare oid) over op.name": "app/src/lib/keri/client.ts anchorSaid reads depends.name/depends.oid first",
    "fallback only strips op.name when it truly starts with group., else throws": "app/src/lib/keri/client.ts anchorSaid: op.name.startsWith('group.') guard + named throw",
    "next domino fixed: issueCredential's identical path also reads depends": "shared anchorSaid; anchorPoll.test.ts 'issueCredential polls group.<ixnSaid>' green",
    "regression fixture with KERIA-0.4.0-verbatim op metadata asserting the polled name": "app/tests/unit/keri/anchorPoll.test.ts — 3 of 4 red against old fallback, all green after fix"
  },
  "summary": "Group-anchor witness poll now derives group.<ixnSaid> from KERIA's metadata.depends instead of fabricating group.registry.<regk> and 404ing the identity-rows leg.",
  "blockers": []
}
**close-report** for #1001 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1001, "status": "success", "commits": [ "f228e1d" ], "changed_files": [ "app/src/lib/keri/client.ts", "app/tests/unit/keri/anchorPoll.test.ts", "STATUS.md" ], "tests": [ { "command": "npx vitest run tests/unit/keri/anchorPoll.test.ts", "exit_code": 0 }, { "command": "npx vitest run tests/unit/keri/ tests/unit/identityLegs.test.ts tests/unit/komitiCredentials.test.ts tests/unit/stewardApprove.test.ts", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "anchorSaid prefers KERIA's metadata.depends (group.<ixnSaid> / bare oid) over op.name": "app/src/lib/keri/client.ts anchorSaid reads depends.name/depends.oid first", "fallback only strips op.name when it truly starts with group., else throws": "app/src/lib/keri/client.ts anchorSaid: op.name.startsWith('group.') guard + named throw", "next domino fixed: issueCredential's identical path also reads depends": "shared anchorSaid; anchorPoll.test.ts 'issueCredential polls group.<ixnSaid>' green", "regression fixture with KERIA-0.4.0-verbatim op metadata asserting the polled name": "app/tests/unit/keri/anchorPoll.test.ts — 3 of 4 red against old fallback, all green after fix" }, "summary": "Group-anchor witness poll now derives group.<ixnSaid> from KERIA's metadata.depends instead of fabricating group.registry.<regk> and 404ing the identity-rows leg.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1001
No description provided.