rented drives: oc_droplet_assert_zero_obtain greps a caddy journal that the release leg already destroyed — a 2-line file makes #559's guard always say "the seed took" #747

Closed
opened 2026-08-24 13:52:26 +00:00 by matou-build-agent · 3 comments

Live-confirmed on drive 20260824T132520Z (#743). On the RENTED target
logs/droplet-caddy.txt is 2 lines long, and both are the harvest's own failure
note — so oc_droplet_assert_zero_obtain's grep runs against a journal that contains
nothing, returns zero matches, and prints:

==> cert seed VERIFY (#559): ZERO new-order lines in the caddy journal — the seed took; the drive contacted LE zero times for the seeded identifiers

on every green rented drive, whether or not the seed took. It is a guard that cannot
fail. #724's own headline proof — and #743's, which asks for
grep -c 'creating new order' logs/droplet-caddy.txt to be 0 — is therefore vacuous on
exactly the drives it was written for
.

Why the journal is empty

scripts/lib/rehearsal-droplet.sh:409 harvests Caddy's journal over ssh to
$OC_E2E_DROPLET_IP at evidence-gather time, inside droplet cleanup. On the rented
path the journey's own release leg destroys the box first (ADR 0189) — so the ssh
fails and the || echo "note: droplet caddy harvest failed (droplet unreachable?)"
fallback is the entire file. This is #724's own root cause one level up: #724 fixed the
cert STORE being released with the box, and left the EVIDENCE being released with it.

Proof it is not merely quiet: drive 20260824T132520Z held no store, so it ordered — and
Cert Spotter has the pair rehearsal-c.idss.nz + *.rehearsal-c.idss.nz, LE notBefore
2026-08-24T12:39:21Z (LE backdates notBefore ~1h, so issued ~13:39Z, the minute that
drive greened). Two real orders; the journal that is supposed to see them says nothing.

Shape of a fix

The rented cert worker already asks the live box this exact question: Phase C's
probe_cmd runs journalctl -u caddy | grep -c "creating new order" over ssh while the
box is still alive, and uses the count to decide the harvest skip
(oc_rented_certs_worker, same file). It just throws the number away unless it takes the
skip branch. Two candidate fixes, both small:

  1. have the worker capture the journal itself into logs/droplet-caddy.txt (or a
    logs/caddy-rented.txt beside it) on its last successful probe, so the file the
    assertion greps is a real journal captured while the box lived; or
  2. have the worker write the count into logs/cert-rented.txt on every path (it
    already writes the "zero new orders" prose only on the skip), and have
    oc_droplet_assert_zero_obtain prefer that number on the rented path.

Either way the assertion must refuse to claim a negative from a journal with no TLS
activity in it — say INCONCLUSIVE, not "the seed took". scripts/rented-cert-evidence.sh
(67754bcd) already applies that rule when reading the same file, and
scripts/tests/rented-cert-evidence-test.sh has the offline case.

Until then

For the rented path, Certificate Transparency is the working oracle: a drive that ordered
nothing adds no new issuance for the slug. Mind LE's ~1h notBefore backdating and CT's own
indexing delay — compare against a baseline taken before the drive, not a snapshot after.
Cert Spotter (api.certspotter.com/v1/issuances?domain=idss.nz&include_subdomains=true)
answers when crt.sh is 502ing, which it was all of 2026-08-24.

Filed by an agent session under ADR 0174 while working #743 (rule 1: file follow-ups, do
not widen the ticket).

**Live-confirmed on drive `20260824T132520Z` (#743).** On the RENTED target `logs/droplet-caddy.txt` is **2 lines long**, and both are the harvest's own failure note — so `oc_droplet_assert_zero_obtain`'s grep runs against a journal that contains nothing, returns zero matches, and prints: > `==> cert seed VERIFY (#559): ZERO new-order lines in the caddy journal — the seed took; the drive contacted LE zero times for the seeded identifiers` on **every green rented drive, whether or not the seed took**. It is a guard that cannot fail. #724's own headline proof — and #743's, which asks for `grep -c 'creating new order' logs/droplet-caddy.txt` to be 0 — is therefore **vacuous on exactly the drives it was written for**. ## Why the journal is empty `scripts/lib/rehearsal-droplet.sh:409` harvests Caddy's journal over ssh to `$OC_E2E_DROPLET_IP` at **evidence-gather time**, inside droplet cleanup. On the rented path the journey's own `release` leg **destroys the box first** (ADR 0189) — so the ssh fails and the `|| echo "note: droplet caddy harvest failed (droplet unreachable?)"` fallback is the entire file. This is #724's own root cause one level up: #724 fixed the cert STORE being released with the box, and left the EVIDENCE being released with it. Proof it is not merely quiet: drive `20260824T132520Z` held no store, so it ordered — and Cert Spotter has the pair `rehearsal-c.idss.nz` + `*.rehearsal-c.idss.nz`, LE notBefore `2026-08-24T12:39:21Z` (LE backdates notBefore ~1h, so issued ~13:39Z, the minute that drive greened). Two real orders; the journal that is supposed to see them says nothing. ## Shape of a fix The rented cert worker **already asks the live box this exact question**: Phase C's `probe_cmd` runs `journalctl -u caddy | grep -c "creating new order"` over ssh while the box is still alive, and uses the count to decide the harvest skip (`oc_rented_certs_worker`, same file). It just throws the number away unless it takes the skip branch. Two candidate fixes, both small: 1. have the worker **capture the journal itself** into `logs/droplet-caddy.txt` (or a `logs/caddy-rented.txt` beside it) on its last successful probe, so the file the assertion greps is a real journal captured while the box lived; or 2. have the worker **write the count** into `logs/cert-rented.txt` on every path (it already writes the "zero new orders" prose only on the skip), and have `oc_droplet_assert_zero_obtain` prefer that number on the rented path. Either way the assertion must **refuse to claim a negative** from a journal with no TLS activity in it — say INCONCLUSIVE, not "the seed took". `scripts/rented-cert-evidence.sh` (67754bcd) already applies that rule when reading the same file, and `scripts/tests/rented-cert-evidence-test.sh` has the offline case. ## Until then For the rented path, Certificate Transparency is the working oracle: a drive that ordered nothing adds no new issuance for the slug. Mind LE's ~1h notBefore backdating and CT's own indexing delay — compare against a baseline taken before the drive, not a snapshot after. Cert Spotter (`api.certspotter.com/v1/issuances?domain=idss.nz&include_subdomains=true`) answers when crt.sh is 502ing, which it was all of 2026-08-24. Filed by an agent session under ADR 0174 while working #743 (rule 1: file follow-ups, do not widen the ticket).
Author
Member

This was generated by AI during triage.

Verified against the current code: oc_droplet_assert_zero_obtain still greps logs/droplet-caddy.txt, which is only populated by an ssh harvest that runs after the rented path's release leg has already destroyed the box — so on the rented path the file is always the unreachable-fallback note, and the assertion's "the seed took" branch is unconditionally true. The claim holds. Not on the one-way-door list (a test/log-behavior fix, revertible by commit, provable offline) — proceeding to ready-for-agent.

Agent Brief

Category: bug
Summary: The rented-drive cert-seed verification (oc_droplet_assert_zero_obtain) always reports "the seed took" on the rented path, because the caddy journal it greps is captured after the box that would contain evidence is already destroyed.

Current behavior:
On the rented drive path, the release leg destroys the droplet before the evidence-gather step's ssh-based caddy-journal harvest runs. The harvest's ssh fails, a fallback note is written in its place, and the zero-new-orders assertion greps that empty/fallback file — it can never see a "certs were ordered" case, so it always passes, even when the seed did not take.

Desired behavior:
The rented path's cert-seed verification reflects a caddy journal that was actually captured while the box was alive (e.g. via the worker's own live probe during Phase C, which already runs the equivalent journalctl | grep -c "creating new order" check before the box is destroyed). When no live-captured evidence exists for a given drive, the assertion must say so explicitly (an inconclusive/skipped verdict) rather than defaulting to "the seed took."

Key interfaces:

  • The rented cert worker's live probe step — it already computes a new-order count while the box lives; that value (or the raw journal) needs to reach the same place the assertion reads from.
  • oc_droplet_assert_zero_obtain (or its caller) — must distinguish "verified zero from live-captured evidence" from "no evidence available," and only claim "the seed took" in the former case.
  • The existing rented-cert-evidence reader (scripts/rented-cert-evidence.sh) already applies an analogous no-claim-without-evidence rule reading the same file — align with that precedent rather than inventing a new convention.

Acceptance criteria:

  • On a rented drive where the seed took (verified live during Phase C), the assertion reports success based on that live evidence, not an empty fallback file.
  • On a rented drive where the seed did NOT take, the assertion reports failure — this is the currently-impossible case that must now be reachable.
  • On a rented drive where no live evidence was captured at all, the assertion reports inconclusive/skipped rather than "the seed took."
  • The self-hosted path's existing (already-valid) behavior is unchanged.
  • An offline test (in the style of scripts/tests/rented-cert-evidence-test.sh) covers all three cases above without needing a live drive.

Out of scope:

  • Changing the self-hosted path's harvest timing (its journal is captured while the box is still alive; not affected by this bug).
  • Certificate Transparency cross-checking (mentioned in the ticket as an interim workaround, not part of the fix).
> *This was generated by AI during triage.* Verified against the current code: `oc_droplet_assert_zero_obtain` still greps `logs/droplet-caddy.txt`, which is only populated by an ssh harvest that runs after the rented path's `release` leg has already destroyed the box — so on the rented path the file is always the unreachable-fallback note, and the assertion's "the seed took" branch is unconditionally true. The claim holds. Not on the one-way-door list (a test/log-behavior fix, revertible by commit, provable offline) — proceeding to `ready-for-agent`. ## Agent Brief **Category:** bug **Summary:** The rented-drive cert-seed verification (`oc_droplet_assert_zero_obtain`) always reports "the seed took" on the rented path, because the caddy journal it greps is captured after the box that would contain evidence is already destroyed. **Current behavior:** On the rented drive path, the release leg destroys the droplet before the evidence-gather step's ssh-based caddy-journal harvest runs. The harvest's ssh fails, a fallback note is written in its place, and the zero-new-orders assertion greps that empty/fallback file — it can never see a "certs were ordered" case, so it always passes, even when the seed did not take. **Desired behavior:** The rented path's cert-seed verification reflects a caddy journal that was actually captured while the box was alive (e.g. via the worker's own live probe during Phase C, which already runs the equivalent `journalctl | grep -c "creating new order"` check before the box is destroyed). When no live-captured evidence exists for a given drive, the assertion must say so explicitly (an inconclusive/skipped verdict) rather than defaulting to "the seed took." **Key interfaces:** - The rented cert worker's live probe step — it already computes a new-order count while the box lives; that value (or the raw journal) needs to reach the same place the assertion reads from. - `oc_droplet_assert_zero_obtain` (or its caller) — must distinguish "verified zero from live-captured evidence" from "no evidence available," and only claim "the seed took" in the former case. - The existing rented-cert-evidence reader (`scripts/rented-cert-evidence.sh`) already applies an analogous no-claim-without-evidence rule reading the same file — align with that precedent rather than inventing a new convention. **Acceptance criteria:** - [ ] On a rented drive where the seed took (verified live during Phase C), the assertion reports success based on that live evidence, not an empty fallback file. - [ ] On a rented drive where the seed did NOT take, the assertion reports failure — this is the currently-impossible case that must now be reachable. - [ ] On a rented drive where no live evidence was captured at all, the assertion reports inconclusive/skipped rather than "the seed took." - [ ] The self-hosted path's existing (already-valid) behavior is unchanged. - [ ] An offline test (in the style of `scripts/tests/rented-cert-evidence-test.sh`) covers all three cases above without needing a live drive. **Out of scope:** - Changing the self-hosted path's harvest timing (its journal is captured while the box is still alive; not affected by this bug). - Certificate Transparency cross-checking (mentioned in the ticket as an interim workaround, not part of the fix).
Author
Member

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

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

close-report for #747 — status success

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

envelope
{
  "issue": 747,
  "status": "success",
  "commits": [
    "c9e86ef"
  ],
  "changed_files": [
    "STATUS.md",
    "scripts/lib/rehearsal-droplet.sh",
    "scripts/tests/rehearsal-rented-certs-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/rehearsal-rented-certs-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/rented-cert-evidence-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/droplet-evidence-order-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/rehearsal-rented-target-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "On a rented drive where the seed took (verified live during Phase C), the assertion reports success based on that live evidence, not an empty fallback file": "Worker captures logs/caddy-rented.txt in Phase C while the box lives (scripts/lib/rehearsal-droplet.sh); assertion prefers it. Test case 15 in rehearsal-rented-certs-test.sh: droplet-caddy.txt is the fallback note, caddy-rented.txt shows TLS activity + zero orders -> verdict 'the seed took'.",
    "On a rented drive where the seed did NOT take, the assertion reports failure (the currently-impossible case now reachable)": "Test case 16: caddy-rented.txt carries 'creating new order' lines even though droplet-caddy.txt is the fallback note -> verdict 'ORDERED ... the seed did NOT take'.",
    "On a rented drive where no live evidence was captured, the assertion reports inconclusive/skipped rather than 'the seed took'": "oc_caddy_zero_obtain_verdict returns INCONCLUSIVE for an absent/empty/no-TLS-activity journal. Test case 17: a two-line unreachable-fallback droplet-caddy.txt, no caddy-rented.txt -> verdict INCONCLUSIVE, never 'the seed took'.",
    "The self-hosted path's existing (already-valid) behavior is unchanged": "Self-hosted harvests droplet-caddy.txt while the box lives, so no caddy-rented.txt exists and the same droplet-caddy.txt is read with the same took/ordered verdict. Test case 18 (oc_reseed_result set, real journal) -> 'the seed took' as before.",
    "An offline test (in the style of rented-cert-evidence-test.sh) covers all three cases above without needing a live drive": "scripts/tests/rehearsal-rented-certs-test.sh cases 14-19 run against fixture files + a fake ssh shim, no live drive; all 18 checks pass."
  },
  "summary": "The rented cert-seed VERIFY now reads a caddy journal captured while the box lived (logs/caddy-rented.txt) and gives a three-way honest verdict (took/ordered/inconclusive), so a green rented drive can no longer falsely report 'the seed took' off a journal harvested from a destroyed box.",
  "reason": "",
  "blockers": []
}
**close-report** for #747 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 747, "status": "success", "commits": [ "c9e86ef" ], "changed_files": [ "STATUS.md", "scripts/lib/rehearsal-droplet.sh", "scripts/tests/rehearsal-rented-certs-test.sh" ], "tests": [ { "command": "bash scripts/tests/rehearsal-rented-certs-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/rented-cert-evidence-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/droplet-evidence-order-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/rehearsal-rented-target-test.sh", "exit_code": 0 } ], "criteria": { "On a rented drive where the seed took (verified live during Phase C), the assertion reports success based on that live evidence, not an empty fallback file": "Worker captures logs/caddy-rented.txt in Phase C while the box lives (scripts/lib/rehearsal-droplet.sh); assertion prefers it. Test case 15 in rehearsal-rented-certs-test.sh: droplet-caddy.txt is the fallback note, caddy-rented.txt shows TLS activity + zero orders -> verdict 'the seed took'.", "On a rented drive where the seed did NOT take, the assertion reports failure (the currently-impossible case now reachable)": "Test case 16: caddy-rented.txt carries 'creating new order' lines even though droplet-caddy.txt is the fallback note -> verdict 'ORDERED ... the seed did NOT take'.", "On a rented drive where no live evidence was captured, the assertion reports inconclusive/skipped rather than 'the seed took'": "oc_caddy_zero_obtain_verdict returns INCONCLUSIVE for an absent/empty/no-TLS-activity journal. Test case 17: a two-line unreachable-fallback droplet-caddy.txt, no caddy-rented.txt -> verdict INCONCLUSIVE, never 'the seed took'.", "The self-hosted path's existing (already-valid) behavior is unchanged": "Self-hosted harvests droplet-caddy.txt while the box lives, so no caddy-rented.txt exists and the same droplet-caddy.txt is read with the same took/ordered verdict. Test case 18 (oc_reseed_result set, real journal) -> 'the seed took' as before.", "An offline test (in the style of rented-cert-evidence-test.sh) covers all three cases above without needing a live drive": "scripts/tests/rehearsal-rented-certs-test.sh cases 14-19 run against fixture files + a fake ssh shim, no live drive; all 18 checks pass." }, "summary": "The rented cert-seed VERIFY now reads a caddy journal captured while the box lived (logs/caddy-rented.txt) and gives a three-way honest verdict (took/ordered/inconclusive), so a green rented drive can no longer falsely report 'the seed took' off a journal harvested from a destroyed box.", "reason": "", "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.

Dependencies

No dependencies set.

Reference
Matou/idss#747
No description provided.