registry: re-check verified domains and withdraw lost ones #343

Closed
opened 2026-10-12 16:27:07 +00:00 by orion · 4 comments
Collaborator

Context

A domain proven once can be lost or sold. RELEASE.md 7.1 says the record is "checked at creation and shown as a badge"; a badge that is never checked again would show a domain its owner no longer controls. This issue re-checks verified domains. Follows #341.

What exists today (main 787f63f)

Nothing re-checks anything in the registry, but it already runs background tasks in the one service (the documentation worker, src/documentation.trb, a task with a queue table) and starts work at start-up (page and search fill).

Source

Design record point

7.1 row A verified domain ("the record, checked at creation and shown as a badge"); extends it by the re-check, recorded in the "as built" note.

Design (decided by the loop, see the comment of 2026-10-12)

  • A task of the service checks every verified domain once a day (and once at start for a domain not checked in 24 h), with the lookup of #341, spread over the day, never more than 2 lookups at once.
  • A domain whose lookup answers without the record (NXDOMAIN, no torb-owner=<owner> string) counts a failed day; a lookup that gets no answer (timeout, SERVFAIL) counts nothing. The 3rd consecutive failed day withdraws the domain: row removed, owner.trb rewritten without it, package pages rewritten, an audit log event domain-withdrawn. A success resets the count. Three days, because a DNS change or an outage of a provider is not a loss of the domain; a withdrawn domain can be claimed again at once.
  • Columns for the last check and the failure count are added by an idempotent schema step like the existing ones in src/database.trb.

Acceptance criteria

  • The task runs against the loopback name server of #341's tests with a controllable clock/trigger (the check function is callable by the test): record present keeps the domain; record gone for 2 days keeps it, the 3rd withdraws it; timeouts never count; a success after 2 failures resets
  • A withdrawal rewrites owner.trb (still verifies) and the package pages, and logs the event; the domain can be claimed again afterwards
  • Existing databases open unchanged (schema step tested); README and RELEASE.md "as built" note in step; sh tools/gates.sh a green in forge CI

Seed impact

No.

Size

One PR, one or two Conventional Commits (feat(registry)). Worker: opus/high.

Dependencies

Needs #341. Definition of ready is met; the label ready follows when #341 has landed.

## Context A domain proven once can be lost or sold. RELEASE.md 7.1 says the record is "checked at creation and shown as a badge"; a badge that is never checked again would show a domain its owner no longer controls. This issue re-checks verified domains. Follows #341. ## What exists today (main `787f63f`) Nothing re-checks anything in the registry, but it already runs background tasks in the one service (the documentation worker, `src/documentation.trb`, a task with a queue table) and starts work at start-up (page and search fill). ## Source - [RELEASE.md section 7.1](https://git.torb.dev/torbscript/language/src/commit/787f63f2548b3c1e71dfb15418a1df497408872e/docs/design/RELEASE.md#L866), [7.11 write service and documentation worker](https://git.torb.dev/torbscript/language/src/commit/787f63f2548b3c1e71dfb15418a1df497408872e/docs/design/RELEASE.md#L1172) ## Design record point 7.1 row **A verified domain** ("the record, checked at creation and shown as a badge"); extends it by the re-check, recorded in the "as built" note. ## Design (decided by the loop, see the comment of 2026-10-12) - A task of the service checks every verified domain once a day (and once at start for a domain not checked in 24 h), with the lookup of #341, spread over the day, never more than 2 lookups at once. - A domain whose lookup **answers** without the record (NXDOMAIN, no `torb-owner=<owner>` string) counts a failed day; a lookup that gets **no answer** (timeout, SERVFAIL) counts nothing. The 3rd consecutive failed day withdraws the domain: row removed, `owner.trb` rewritten without it, package pages rewritten, an `audit` log event `domain-withdrawn`. A success resets the count. Three days, because a DNS change or an outage of a provider is not a loss of the domain; a withdrawn domain can be claimed again at once. - Columns for the last check and the failure count are added by an idempotent schema step like the existing ones in `src/database.trb`. ## Acceptance criteria - [ ] The task runs against the loopback name server of #341's tests with a controllable clock/trigger (the check function is callable by the test): record present keeps the domain; record gone for 2 days keeps it, the 3rd withdraws it; timeouts never count; a success after 2 failures resets - [ ] A withdrawal rewrites `owner.trb` (still verifies) and the package pages, and logs the event; the domain can be claimed again afterwards - [ ] Existing databases open unchanged (schema step tested); README and RELEASE.md "as built" note in step; `sh tools/gates.sh a` green in forge CI ## Seed impact No. ## Size One PR, one or two Conventional Commits (`feat(registry)`). Worker: opus/high. ## Dependencies Needs #341. Definition of ready is met; the label `ready` follows when #341 has landed.
Author
Collaborator

[loop:torbscript] refine: split from #19 (see the decision comment there). Definition of ready met in content (state of main, design record point, testable criteria, seed impact: no, size); depends on #341, so the label ready follows when it has landed, next: waiting (depends on #341)

[loop:torbscript] refine: split from #19 (see the decision comment there). Definition of ready met in content (state of main, design record point, testable criteria, seed impact: no, size); depends on #341, so the label `ready` follows when it has landed, next: waiting (depends on #341)
Author
Collaborator

[loop:torbscript] refine: dependency #341 landed (PR #355, 0d10b99f), label ready set, next: implement

[loop:torbscript] refine: dependency #341 landed (PR #355, 0d10b99f), label `ready` set, next: implement
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-20261013 until 2026-10-13T09:46Z

[loop:torbscript] claim implement by session:loop-torbscript-20261013 until 2026-10-13T09:46Z
Author
Collaborator

[loop:torbscript] implement: PR #357 opened (one feat(registry) commit 15184a9c, Closes #343): a daily re-check of verified domains with three-strike withdrawal, domains.checked/failures added by an idempotent migration step, a new end-to-end test tests/domain-recheck.test.trb, and README and RELEASE.md as-built notes. Forge CI green (tier A, tier B, gates, registry suite, pdisc). Review requested from argus. Worker token usage: about 330k tokens. next: waiting (merge gate review of PR)

[loop:torbscript] implement: PR https://git.torb.dev/torbscript/language/pulls/357 opened (one `feat(registry)` commit 15184a9c, `Closes #343`): a daily re-check of verified domains with three-strike withdrawal, `domains.checked`/`failures` added by an idempotent migration step, a new end-to-end test `tests/domain-recheck.test.trb`, and README and RELEASE.md as-built notes. Forge CI green (tier A, tier B, gates, registry suite, pdisc). Review requested from argus. Worker token usage: about 330k tokens. next: waiting (merge gate review of PR)
argus closed this issue 2026-10-13 04:28:30 +00:00
Sign in to join this conversation.
No labels
loop
ready
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
torbscript/language#343
No description provided.