Commit graph Bifrost/tests
Author SHA1 Message Date
Heimdall
5fbb673c55 Test: MergeProofs holder (red; type is a skeleton)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 09:56:49 +00:00
Heimdall
0599aedf08 Test: a 307 from Heimdall is not followed by the auth and member clients (red)
AddHeimdallClients gathers the three Heimdall client registrations so the test
exercises the registrations Program uses. The auth and member clients still
follow redirects here; the mover already does not.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 09:56:19 +00:00
Heimdall
757ca2eeab Account merge saga: plan digest ignores the id of a membership not yet created, pin grace boundary, unique move ids and the confirm write gate, ProofSeal prints no bearer, commit the mutant probe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 09:26:27 +00:00
Heimdall
a2172349ba Account merge saga: pin that a receipt mismatch stays the recorded answer across later sweeps
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 08:09:39 +00:00
Heimdall
b47a6557cb Move client: pin duplicate identityIds and over-length proofs as refused before any request
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 07:49:52 +00:00
Heimdall
41f4cc3853 Account merge saga: consumer tests through the real host and the fake mover, live-Postgres races, docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 06:48:43 +00:00
Heimdall
c62166c6ce Account merge ledger: pin the Stripe refusal for a folded account whose survivor is suspended
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 06:32:44 +00:00
Heimdall
f726101207 Account merge ledger: one write gate for every writer, held across the standing read and the save
WriteAsAsync takes a shared Postgres advisory lock on the account (the key the chain trigger locks exclusively) across the standing read and the writer's save; CommitAsync takes the exclusive lock before it reduces. Votes, appraisals, sealed commit and reveal, patron events (RecordSupportEventAsync routes and journals in the same save, so the manual Ledger door obeys it too) and the Heimdall sign-in pass through it; SupportTargetAsync, MayWriteAsync and JournalIntakeAsync are deleted. A folded or frozen account's sign-in writes no membership. A retry of an event stranded on the folded account journals nothing. Tests: Down refuses in every merge state, Stripe journal prior owner and undo, the lock racing a freeze and a commit on live Postgres. Docs say what the lock guarantees and what it does not.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 06:08:36 +00:00
Heimdall
5df08bd94a Move client: pin that invalid_request at 413 and 415 is Unknown, the rule is exactly 400
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 06:08:36 +00:00
Heimdall
41189e14d3 Merge mover client (heimdall/account-merge-mover-client b7b33bc) into account merge ledger 2026-11-14 05:55:57 +00:00
Heimdall
10fc9803d7 Account merge ledger: test the migration's duplicate current Patron snapshot dedupe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 04:59:44 +00:00
Heimdall
537a477dc3 Account merge ledger: roll-forward-only Down guard, standing-at-write through one owner for every writer, one current Patron snapshot per membership, memberless Heimdall sign-in, intake and Stripe routing through one owner
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 04:58:26 +00:00
Heimdall
b7b33bc5db Move client: a 400 is RequestInvalid only with Heimdall's invalid_request body
An nginx HTML 400, an empty 400 or any other 400 is Unknown. The fake answers its schema 400 with Heimdall's error handler body.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 04:14:38 +00:00
Heimdall
aa348d3b43 Account merge ledger: link step refuses a frozen account (test), drop the redundant sync guard, accept a deadlock victim as the racing commit's loser
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 04:13:54 +00:00
Heimdall
1ffb8886c0 Move client: Refused only for Heimdall's coded move refusals, any pipeline exception is Unknown, ids end at \z
An uncoded 4xx (gateway 404, 408, 410, unknown code) is Unknown: Refused wipes sealed proofs. Unrecognized leaves the refusal enum.
The catch lists no types: only the caller's cancellation propagates. moveId and reversesMoveId patterns use \z in client and fake,
so a trailing line feed is refused as Heimdall's ajv refuses it; 64, 65 and newline are pinned.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 03:50:42 +00:00
Heimdall
f402eb13cc Account merge ledger: fix the first Soul pass (suspension carried into a memberless survivor, merged status terminal, standing at the desk door, linked accounts and write time, journalled grace intake, survivor weight on moved votes, one-hop alias, State token and database guards for overlapping merges, live-Postgres tests)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 03:37:48 +00:00
Heimdall
baa70bcef0 Move client: no redirects, one deadline over body reads, 64 KiB receipt cap, 409 move_id_conflict is Unknown
A 3xx is Unknown and never carries the secret or proofs off origin (registration owns the handler);
the HttpClient timeout now bounds the body read and any IOException or stall is Unknown; receipts
over 64 KiB are Unknown; the request's ToString hides its proofs; move_id_conflict is Unknown because
a committed move answers it when its proofs no longer verify, which keeps the sealed proofs resumable;
identity ids need not be GUIDs, proofs are bounded to 8192 and identityIds unique.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 03:13:14 +00:00
Heimdall
13ab2e3be7 Fake mover: port Heimdall 4fe367a's route schema and decision order
400 for every body the route schema rejects (oneOf toProof/reversesMoveId, duplicate or empty
identityIds, proof bounds), 404 identity_not_found for a source holding nothing, coverage-all-null
403 before the store, store order not_reversible/already_moved/not_found/not_proved/provider_conflict,
replay by signature without liveness (409 move_id_conflict for unsigned proofs), future-dated proofs
stale. Soul's P1-P4 are committed as FakeHeimdallMoverTests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 03:13:14 +00:00
Heimdall
84ff2c4578 Account merge ledger: AccountMerge receipt, reductions, alias standing, undo and final sweep
AccountMergeLedger owns what a merge does to Bifrost records: PlanAsync (dry run, block codes),
CommitAsync (one save, total, idempotent), UndoLocalAsync (journal replay), FinalizeDueAsync
(AccountMergeSweeper) and StandingAsync/ResolveAsync. Votes and concept appraisals are voided by a
stamp that a model query filter hides from every tally. The actor accessor no longer ORs several
credentials under SingleOrDefault (a latent crash); a frozen or folded account resolves to no
account on every route, the OIDC authorize and chat refusal deny it, and patron intake follows the
alias. Migration AddAccountMerges is additive. No UI, no Heimdall call, nothing deployed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 02:31:51 +00:00
Heimdall
fbb5853b1d Fake Heimdall mover and consumer-side move client tests
FakeHeimdall.Moves owns per-account logins, a bearer registry, revoked sessions and stored moves,
and answers the identity-moves route in decideMove's order (4fe367a): replay before proofs,
strict passkey coverage, freshness windows, first-receipt replay. Fault switches for status,
apply-then-fail and down.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 02:27:38 +00:00
Heimdall
ee700d4931 Test: snapshot has no drift from the design-time model (passes at base 425af74)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 02:20:25 +00:00
425af74500 Passkeys: WebAuthn enrolment under a fresh sign-in, 48 h cooling-off, assertion proof at unlink (#85)
Delta Soul clean at 73f97ed (no blocking findings; one Low: challenge check and spend not atomic).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 00:37:56 +00:00
Heimdall
18f1ec6aca Linked accounts: drop the list after an unlink with an uncertain end; Google never mints; docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 20:23:54 +00:00
Heimdall
8e65f56b0c Linked accounts: never guess a proof provider; require stepUpRequested; no-store on completion
With no current list the proof goes only through a provider the member names, never the
session's sign-in provider: a sign-in through an unlinked provider makes Heimdall mint an
orphan account holding that login. Link buttons need a current list. The unlink completion
must say a step-up was requested. POST /auth/heimdall/complete answers no-store. The fake
Heimdall now models orphan minting, derives step_up_at from the start's stepUp flag, and
enforces the app secret, sign_in-only, unsupported-provider and 600 s rules.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 20:08:07 +00:00
Heimdall
b65bec65ce Linked accounts: docs, README line, proof-provider and no-store tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 19:43:59 +00:00
Heimdall
59ecaa606b Linked accounts page: list, link any admitted provider, unlink with step-up proof
A member sees their Heimdall logins, links Discord, Patreon or Google, and unlinks one
with a fresh Google step-up sign-in. Bifrost keeps no Heimdall token: each action is a
fresh Heimdall sign-in started by Bifrost whose bearer lives inside the completion
request. The list is kept five minutes in this process as non-secret fields only.

The Status page's Google-only link button and handler are cut; the Linked accounts page
owns link starts. HeimdallStartRequest gains stepUp. Heimdall's member routes use a
client without the app secret.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 19:35:40 +00:00
Heimdall
1771f15789 Soul fixes: deploy doc says production refuses a blank secret; name the echo test for what it checks
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 19:27:57 +00:00
Heimdall
1739d5552a Refuse production startup when the Heimdall app secret is blank
A missing secret silently switched Discord and Patreon member sign-in off.
Outside Development and Testing the validator now fails naming
Heimdall:AppSecretFile and Heimdall:AppSecret, never a value.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 19:23:43 +00:00
Heimdall
1298e7db1e Pin the Google link guards: own slot beside a parallel attempt, undefined purpose, empty pending link id, non-linked 201
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 16:26:25 +00:00
Heimdall
1fbe16eb73 Complete page pin: the form also carries pendingLinkId
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 15:46:34 +00:00
Heimdall
95416653ba Google link: tests and fake Heimdall link routes (red until the flow lands)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 15:21:40 +00:00
Heimdall
31ced94f2a Start refusal: read headers only so the 4 KiB bound limits the read; narrow the swallow to non-cancellation
Soul re-pass on 87a1bb6b: PostAsJsonAsync buffered the whole body before the cap applied. Test renamed to say what it pins.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 14:48:35 +00:00
Heimdall
87a1bb6b3b Start refusal: bound the body read, survive undecodable bodies, pin the code length cap
Soul pass on c085cead: a refusal with an unsupported charset escaped as a 500, the body was read without a bound, and the 64-character cap was untested.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 14:41:14 +00:00
Heimdall
c085cead9d Heimdall start refusal: log the HTTP status and Heimdall's error code
The journal said only 'Heimdall rejected the auth start', which cannot tell a wrong app secret (401 app_auth_required) from a fault. The message now carries the status and, when the body has one, an error code that is a short snake_case token; no other body text is echoed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 14:26:14 +00:00
Heimdall
280d843aeb AppSecretFile: pin the deprecation at Warning level, say trailing newlines
Soul pass on 25b9cc16: the warning level was unpinned (a Trace demotion passed) and the docs said one newline where the code trims all.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 13:46:24 +00:00
Heimdall
95d2e8d262 Read the Heimdall app secret from Heimdall__AppSecretFile; env value deprecated
The file wins, is read once when the options are built, and a set-but-missing,
unreadable or empty file stops startup in every environment without naming the
secret. Heimdall__AppSecret still works and logs a deprecation warning.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 13:24:59 +00:00
b80b27da0f Linux path fixes: containment by path.relative, hostile-cursor test, verify prerequisites (#77) 2026-11-12 12:55:35 +00:00
420a4dbf85 Mouth: follow upgrades only a plain basis; @room keeps room (#76) 2026-11-12 12:28:39 +00:00
a1b173079d tests: dispatch-gate tests run on Linux; classify the remaining Yggdrasil failures (#75) 2026-11-12 12:24:51 +00:00
afafff18bd Mouth: basis "follow" for engagement peers (CHAT_FOLLOW, default off) (#74) 2026-11-12 12:21:31 +00:00
c2de290628 Desk: UnixSocketDeskDoor (Huginn desk door client), fixtures at 79d954c, card re-pin to CultLib 3a51bbab, card opaque (#70) 2026-11-12 11:44:45 +00:00
4cb83971f9 Desk: bearer credential (OpenIddict validation, desk.read/desk.answer, audience bifrost-desk) and answerer masking (#71) 2026-11-12 10:17:29 +00:00
d4365a8364 Mouth: fetch one named event's image for its Persona, store it, post an inert receipt (CHAT_FETCH, off by default) (#73)
A Persona's Mind shell holds no Matrix token, so the mouth now keeps one named image for her: it reads her live membership and the room's full state, takes content.url from the fetched event only, checks info.sha256 against the hash it computed, stores the bytes in her image store and posts the inert org.gamecult.file_received receipt as her own user. Behind CHAT_FETCH (exactly 1), off by default; an off mouth answers the kind as UnknownKind. Not deployed by this merge.

Shipper: Eureka. Reviewed by Heimdall against cut-mouth-fetch-attachment.r7 (bundle 3a6b45d, then delta d4bccd4: one log line per fetch with a fixed cause=, event-id percent-encoding pinned, doc-only change to docs/bridge.md).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 00:59:28 +00:00
0d820fdc00 Mouth: id shape on every delivery field, mentions bounded in bytes, round cap counts every target GET (#72) 2026-11-11 21:06:13 +00:00
7231cdb977 Mouth: reply_to lows after #64 (round cap defers, 60 s excerpt, wider scrub, id shape) (#68) 2026-11-11 20:05:46 +00:00
1da912d5e9 Members: approve refuses no-membership/unknown accounts; neutral text for legacy suspensions (#65) 2026-11-11 16:39:48 +00:00
e12b8e2298 Mouth: v4 fixes after Soul pass (target cache, scrub, read cap) (#64) 2026-11-11 16:17:09 +00:00
dc35c4a254 Mouth: chat_pending.v4 reply_to (flag, default off) (#63) 2026-11-11 16:06:28 +00:00
ab89556101 Chat sign-in needs a live consent receipt; notice frozen as version 1 (#59) 2026-11-11 14:32:06 +00:00
e8df60630e Prefix lengths: host-level startup tests (tests only) (#62) 2026-11-11 14:12:55 +00:00