Skip to content

01a0953e - Add a public Trust Chain that loads neighbors on click - #125

Merged
TaprootFreak merged 35 commits into
developfrom
01a0953e-trust-chain
Sep 15, 2026
Merged

TaprootFreak merged 35 commits into
developfrom
01a0953e-trust-chain

Conversation

@TaprootFreakAI

@TaprootFreakAI TaprootFreakAI commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

EN:
Adds a public Trust Chain of stored who-verified-whom edges. Bare GET /trust-chain returns founder seeds only; ?around= returns one hop so a large chain is not dumped on first paint.
Staff POSTs write those edges; operator PATCH still sets role without writing history.

DE:
Fügt eine öffentliche Trust-Kette aus gespeicherten Kanten hinzu, wer wen verifiziert hat. Das nackte GET /trust-chain liefert nur Founder-Kerne; ?around= liefert einen Hop, damit eine grosse Kette nicht beim ersten Laden kommt.
Staff-POSTs schreiben diese Kanten; Operator-PATCH setzt die Rolle weiterhin ohne Historie.

Details

Bare GET /trust-chain returns founder accounts with empty edges. GET /trust-chain?around=<id> returns that chain member plus stored public edges that touch them (verify, moderator_confirm, moderator_appoint; moderator_propose omitted). Unknown or basis around is 404. Store throw is 503.

TrustStore.listEdgesTouching is the indexed 1-hop query (subject_id or actor_id). Public JSON stays {nodes,edges} with no secrets.

@TaprootFreakAI
TaprootFreakAI force-pushed the 01a0953e-trust-chain branch 2 times, most recently from 650fbb5 to 5ae1b10 Compare September 13, 2026 10:52
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 13, 2026 11:01
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 13, 2026 19:47
@TaprootFreakAI TaprootFreakAI changed the title 01a0953e - Add a public Trust Chain of who verified whom 01a0953e - Add a public Trust Chain that loads neighbors on click Sep 13, 2026
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 07:27
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 07:37
@TaprootFreakAI
TaprootFreakAI force-pushed the 01a0953e-trust-chain branch 2 times, most recently from 14d55ce to 2cd0f94 Compare September 14, 2026 11:09
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 13:23
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 19:24
@TaprootFreakAI
TaprootFreakAI force-pushed the 01a0953e-trust-chain branch 2 times, most recently from 624f640 to c602a2d Compare September 14, 2026 19:57
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 20:33
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 15, 2026 01:27
@TaprootFreakAI
TaprootFreakAI force-pushed the 01a0953e-trust-chain branch 4 times, most recently from 72cb024 to a15a7b6 Compare September 15, 2026 09:42
Persist trust edges, expose GET /trust-chain from stored nodes and
edges, and add staff POSTs to verify, propose, confirm, or appoint.
Operator PATCH still sets role only; POST /debug/trust-edges backfills.
Wrap Hono request helpers in Promise.resolve and drop a
never-matching propose-kind comparison on public edges.
Prettier the new sources and drop brace-wrapped @throws tags
that eslint-plugin-tsdoc treated as inline tags.
InMemoryAuthStore ignores a create when viewKey is already taken, so
shared fixture keys dropped later accounts and staff sessions 401ed.
Make insertEdge async so duplicate throws reject as a Promise.
Passing undefined into a default parameter still used the secret, so
the unconfigured case never hit 503.
Same-role same-time nodes are ordered by id from either input order.
The equal-id comparator arm is unreachable for unique account ids.
Staff verify, confirm, and appoint persist the unique edge first so a
duplicate kind, including debug backfill, returns 409 with the role
unchanged. Handbook Function sections list trustStore; the sort-tie
return is covered without a coverage ignore.
Bare GET /trust-chain returns founder seeds only. ?around= returns that
account plus one hop of stored public edges so a large chain is not dumped
on first paint.
Bare GET /trust-chain (or empty around) is founder seeds. A supplied
around that is not a uuid, unknown, or basis is 404, including Postgres
22P02.
Bare GET 200 example is founder seeds with empty edges. Neighborhood
example is a one-hop public edge. Staff POSTs document 503. Empty
around is founder seeds in unit and e2e tests.
Unexpected store throw is 503 Trust chain is unavailable, logged as
debug.trust_edges.failed, matching the route and handbook.
POST /debug/trust-edges success logs subjectId, actorId, and kind,
matching the route and the staff trust write logs in SPEC.
The rebase kept both the trust_edge-before-db_change check and the
fiat-table order check; they shared one identifier.
SPEC already requires unexpected store throws to return
Trust chain is unavailable. getAccount sat outside the catch that
covered insert and list, so a Postgres query failure escaped.
The role table and debug PATCH notes still said only a moderator
assigns Verified; staff POSTs already let a founder confirm too.
The SPEC table still called GET /trust-chain a full stored graph;
bare GET returns founder seeds and empty edges.
Prettier reflows the decision table and env tree after merging
develop's 2026-09-14 rows with Trust Chain.
The env table and Trust Chain changelog now match prettier@3.9.4
from the lockfile.
Bare GET /trust-chain returns founder seeds; ?around= is one hop of
stored public edges. Non-uuid, unknown, or basis around is 404.
Develop notifies every account except the actor; Web Push stays
bell-only. The Trust Chain changelog rows stay after that.
The Trust Chain merge had glued Returns onto the Inputs line.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 2 review passes.
Bare GET /trust-chain returns founder seeds; ?around= loads one hop of stored public edges.

DE:
Bereit nach 2 Review-Durchläufen.
Nacktes GET /trust-chain liefert Founder-Kerne; ?around= lädt einen Hop gespeicherter öffentlicher Kanten.

Details

Head 51d3b5e. Four review lanes at this head: quality and logic, both 0 findings after the handbook Inputs/Returns split. Comment gate: no open review threads, no inline comments. Mergeable, 0 commits behind develop, CI green (typecheck/lint/handbook/e2e-check/coverage/build/e2e).

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 15, 2026 12:29
@TaprootFreak
TaprootFreak merged commit 65cc0ed into develop Sep 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants