Heimdall/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 0444360733 Schema check: valid, deterministic keys; Postgres-printed predicates; column grants; nullability
Soul pass 6, F1-F4, F7 and F8.

Keys (F1, F2): a key is met only by a unique index that is valid and
ready, so the invalid index a failed CREATE UNIQUE INDEX CONCURRENTLY
leaves behind (every sign-in failing with 42P10, or one consume taking
two rows) is refused; and whose key columns compare under deterministic
collations, so a case-insensitive collation cannot merge two providers'
user ids into one row and move an identity between accounts.

Predicates (F3, F7): the declared predicates are printed by Postgres
itself, by indexing a temporary copy of each keyed table's declared
columns in one transaction that is rolled back, and compared with the
index's printed predicate as sets of top-level AND-ed conditions, split
by nesting and never inside quoted text. Case and structure are kept, so
((a OR b) AND c) and (a OR (b AND c)) differ, as do 'Pending' and
'pending', and an extra condition narrows the predicate and is refused.
Conditions in another order match.

F4: lookup-only indexes are no longer required (REQUIRED_RELATIONS is now
REQUIRED_TABLES; unique indexes are checked by shape in REQUIRED_KEYS), so
a renamed attempt index or a dropped lookup index starts. Privileges are
checked per column with has_column_privilege on every column the schema
declares, which a table grant satisfies; a role granted each needed
privilege column by column starts and runs every store operation, and one
holding INSERT on only one audit column is refused. On (c): a unique index
treats NULL keys as distinct unless it is NULLS NOT DISTINCT, so rows with
a NULL attempt_id never collide and `attempt_id IS NOT NULL` is redundant;
that condition may be absent from the attempt index's predicate, except on
a NULLS NOT DISTINCT index (refused). A key declared without a predicate
must have none, since ON CONFLICT cannot infer a partial arbiter.

F8: a column the schema leaves nullable must be nullable; NOT NULL added
to attempt_id is refused. CHECK constraints, triggers and row-level
security stay out of scope, as the schema comment says.

Every change is a live fixture: invalid identity key, invalid attempt
index over duplicate attempts, case-insensitive key, narrowed and
OR-widened predicates, NULLS NOT DISTINCT, NOT NULL added, partial column
grants are refused; reordered and unredundant predicates, a renamed
attempt index, dropped lookup indexes and column-by-column grants start.
The fake-pool code-mapping tests are replaced by unit tests of the
predicate comparison.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:40:12 +02:00
..
access-plugin.test.ts Tests/docs: promote Soul's two it.fails, update the tripwire and fixtures 2026-09-08 14:23:04 +02:00
app.test.ts Pin provider errors and Bifrost's reply exactly; defend errorIdentity's filters 2026-09-30 18:57:17 +02:00
browser-adapter.test.ts Resume browser sign-in by attempt id, not the completion code 2026-09-23 20:50:28 +02:00
caller-identity-attack-soul-r21.test.ts Close the three one-line holes Soul left as follow-ups 2026-09-08 15:08:38 +02:00
caller-identity-attack-soul.test.ts Narrow the built-in profile lookup so the branch typechecks 2026-09-08 14:54:17 +02:00
caller-identity-soul.test.ts Tests/docs: promote Soul's two it.fails, update the tripwire and fixtures 2026-09-08 14:23:04 +02:00
capability-rules.test.ts Make app capability rules data instead of code 2026-09-06 23:58:58 +02:00
config-secrets.test.ts readSecretInput: never print the path, refuse relative paths and blank secrets 2026-09-30 13:50:53 +02:00
entrypoint-secrets.test.ts Every start connects to Postgres; pin the signing key's read refusal 2026-09-30 15:30:10 +02:00
idunn-candidate-bind.test.ts Move the private command port with the candidate 2026-09-06 22:15:34 +02:00
idunn-rudp-health.test.ts Publish runtime presence in the contract Odin admits 2026-09-07 22:19:51 +02:00
odin-publication.test.ts Give Heimdall Odin documents unique catalog keys 2026-08-22 03:47:02 +02:00
presence-identity-descriptor.test.ts Assert descriptor selection instead of reading a live descriptor 2026-09-08 13:52:47 +02:00
private-command-diagnostics.test.ts Pin provider errors and Bifrost's reply exactly; defend errorIdentity's filters 2026-09-30 18:57:17 +02:00
process-write-lease.test.ts Follow CultLib's package rename and select workspaces by path 2026-09-07 22:26:24 +02:00
recipe-secrets.test.ts Recipe test: explore loadConfig's branches, refuse environment copies 2026-09-30 18:58:02 +02:00
security.test.ts Pin the token-key length refusal custody now relies on 2026-09-30 14:03:24 +02:00
store.test.ts Schema check: valid, deterministic keys; Postgres-printed predicates; column grants; nullability 2026-09-30 20:40:12 +02:00
verse-runtime.test.ts Retire the Spotiverse profile; keep the spotify provider intact for restore 2026-09-06 01:47:10 +02:00
verse-witness.test.ts Retire the Spotiverse profile; keep the spotify provider intact for restore 2026-09-06 01:47:10 +02:00