Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
38bae78
feat(reconciliation): add evidence-derived lifecycle command
seonghobae Sep 1, 2026
0a96685
feat(reconciliation): persist lifecycle transition authority
seonghobae Sep 1, 2026
35f5bb9
feat(reconciliation): export lifecycle command
seonghobae Sep 1, 2026
2cab22c
test(reconciliation): prove lifecycle command boundaries
seonghobae Sep 1, 2026
7ed99e7
test(reconciliation): verify lifecycle guard on PostgreSQL
seonghobae Sep 1, 2026
d0f4ad4
fix(reconciliation): align lifecycle purpose and receipt contracts
seonghobae Sep 1, 2026
9e2c98c
docs(adr): define reconciliation lifecycle authority
seonghobae Sep 1, 2026
ecb51d5
docs(doctoring): trace lifecycle concurrency evidence
seonghobae Sep 1, 2026
ef1c5ca
docs(product): advance reconciliation authority baseline
seonghobae Sep 1, 2026
b3da1d5
test(reconciliation): use exact decimal lifecycle bridge fixture
seonghobae Sep 1, 2026
5fde978
fix(reconciliation): make lifecycle command and status atomic
seonghobae Sep 1, 2026
028fc9b
test(reconciliation): prove atomic lifecycle pairing
seonghobae Sep 1, 2026
24a9797
test(reconciliation): rollback expected database guard failures
seonghobae Sep 1, 2026
bffc99e
test(reconciliation): close lifecycle edge-case coverage
seonghobae Sep 1, 2026
7d11849
test: bind reconciliation lifecycle currency to run scope
seonghobae Sep 1, 2026
e4c0943
fix: bind lifecycle snapshot currency from run
seonghobae Sep 1, 2026
75662c5
fix: preserve lifecycle snapshot helper compatibility
seonghobae Sep 1, 2026
62d34ce
test: exercise locked run currency override
seonghobae Sep 1, 2026
3754a9b
docs: record lifecycle currency authority repair
seonghobae Sep 1, 2026
979fcdc
test: require named reconciliation status commands
seonghobae Sep 1, 2026
c05af31
fix: require named reconciliation status transitions
seonghobae Sep 1, 2026
286e08c
docs: record named status-command guard
seonghobae Sep 1, 2026
9ac14d7
docs: make reconciliation status authority explicit
seonghobae Sep 1, 2026
102ba14
test: reject terminal reconciliation run inserts
seonghobae Sep 1, 2026
3039ad6
fix: require evaluating reconciliation run creation
seonghobae Sep 1, 2026
50f8085
docs: bind reconciliation initial state authority
seonghobae Sep 1, 2026
56b4f36
docs: record reconciliation initial-state guard
seonghobae Sep 1, 2026
b90e6d9
test: ratchet reconciliation initial-state guard
seonghobae Sep 1, 2026
8cc21a5
test: persist lifecycle replay population evidence
seonghobae Sep 1, 2026
9151a3e
fix: persist lifecycle source populations
seonghobae Sep 1, 2026
796bf34
fix: replay lifecycle source provenance
seonghobae Sep 1, 2026
dee77b5
test: prove reconciled evidence aggregate membership is immutable
seonghobae Sep 1, 2026
c1b689d
docs: bind lifecycle replay source provenance
seonghobae Sep 1, 2026
113f79f
docs: record exact replay provenance repair
seonghobae Sep 1, 2026
b673290
fix: freeze reconciliation evidence aggregate membership
seonghobae Sep 1, 2026
adc7259
docs: define reconciliation evidence aggregate membership
seonghobae Sep 1, 2026
8fc0e1f
docs: doctor reconciliation aggregate membership repair
seonghobae Sep 1, 2026
7cdc2e8
test: ratchet reconciliation aggregate membership
seonghobae Sep 1, 2026
5096f4e
fix: freeze reconciliation aggregate membership
seonghobae Sep 1, 2026
7e34501
chore: fold unreleased aggregate guard into 0019
seonghobae Sep 1, 2026
97a8af4
docs: freeze reconciliation aggregate membership
seonghobae Sep 1, 2026
bf2b432
docs: align aggregate membership ADR with unreleased migration
seonghobae Sep 1, 2026
a880698
docs: align aggregate membership doctoring with 0019
seonghobae Sep 1, 2026
2f8d127
docs: record aggregate membership hardening
seonghobae Sep 1, 2026
63f42a8
test: prove lifecycle replay and aggregate scope
seonghobae Sep 1, 2026
59159fc
docs: ratchet reconciliation lifecycle aggregate boundary
seonghobae Sep 1, 2026
9b76dc0
test: expose evidence-free reconciliation supersession
seonghobae Sep 1, 2026
e7a4707
fix: require reviewed evidence before supersession
seonghobae Sep 1, 2026
9a52955
test: align supersession contract with no-op terminal updates
seonghobae Sep 1, 2026
95953cd
docs: record reconciliation supersession authority repair
seonghobae Sep 1, 2026
c1aaebb
docs: bind reviewed-only supersession into product baseline
seonghobae Sep 1, 2026
75bb1b9
merge: reconcile parent lifecycle work into canonical transition
seonghobae Sep 1, 2026
7ce38e3
test: require explicit accounting runner image
seonghobae Sep 1, 2026
8f3b2ba
ci: pin accounting runner image
seonghobae Sep 1, 2026
780b6c0
chore: diagnose and normalize reconciliation CI repair
seonghobae Sep 1, 2026
2ce4eb0
chore: remove queued temporary repair workflow
seonghobae Sep 1, 2026
8270687
merge: carry parent reconciliation snapshot fixes
seonghobae Sep 1, 2026
8d96832
test: align close scope with reconciled authority
seonghobae Sep 1, 2026
143b9fb
test: align reconciliation gap baseline contract
seonghobae Sep 1, 2026
f17ab0a
ci: repair reconciliation run fixture cutoff
seonghobae Sep 1, 2026
89a7a35
ci: repair historical cutoff test overrides
seonghobae Sep 1, 2026
83ff926
test: bind run fixture cutoff to database time
github-actions[bot] Sep 1, 2026
efe4bbe
ci: re-arm exact-head checks after guarded repair
seonghobae Sep 1, 2026
c71c37f
test: guard supersession in latest approval migration
seonghobae Sep 1, 2026
c2c4848
fix: preserve supersession authority after lock-order migration
seonghobae Sep 1, 2026
093d297
test: use consistent snapshot ledger double
seonghobae Sep 1, 2026
6c48fb4
test: honor authoritative close snapshot boundary
seonghobae Sep 1, 2026
b222594
test: model repeatable-read close authority
seonghobae Sep 1, 2026
b8a9400
docs: record supersession migration-order root cause
seonghobae Sep 1, 2026
4840b8d
ci: capture PR43 failing behavior test log
seonghobae Sep 1, 2026
ab48a1c
ci: remove bounded PR43 diagnostic workflow
seonghobae Sep 1, 2026
80b01b2
ci: repair PR43 close-package authority test doubles
seonghobae Sep 1, 2026
ec9cfd9
test: reject unassigned reconciliation transition hash
seonghobae Sep 1, 2026
1340230
test: bind lifecycle snapshot digest to run currency
seonghobae Sep 1, 2026
9b39579
fix: fail closed on unassigned reconciliation evidence
seonghobae Sep 1, 2026
709cdd3
test: align lifecycle doubles with persisted authority rows
seonghobae Sep 1, 2026
7f3346c
test: align authoritative close-package double with database projection
seonghobae Sep 1, 2026
db8e26d
test: align active-state close double with database projection
seonghobae Sep 1, 2026
8825f34
test: align approval provenance double with database projection
seonghobae Sep 1, 2026
69691ba
chore: remove completed PR43 repair workflow
seonghobae Sep 1, 2026
9205863
chore: stage PR43 population evidence test repair
seonghobae Sep 1, 2026
7c0c79f
test: use authoritative reconciliation population digests
seonghobae Sep 1, 2026
c37f43c
chore: remove completed PR43 population repair workflow
seonghobae Sep 1, 2026
bd06180
fix: reserve reconciliation command identity across command families
seonghobae Sep 1, 2026
ce7a279
test: prove reconciliation command identity is cross-family unique
seonghobae Sep 1, 2026
3adf4ab
test(reconciliation): expose cross-command idempotency race
seonghobae Sep 1, 2026
0608064
test(reconciliation): align shared identity concurrency proof
seonghobae Sep 1, 2026
d17b926
docs(reconciliation): trace shared command identity concurrency
seonghobae Sep 1, 2026
4c50c3f
docs(reconciliation): model shared lifecycle command identity
seonghobae Sep 1, 2026
5aee4f3
docs(reconciliation): map lifecycle identity controls
seonghobae Sep 1, 2026
f269d7f
test(reconciliation): require domain conflict for shared key
seonghobae Sep 1, 2026
01e94df
fix(reconciliation): normalize lifecycle-owned run keys
seonghobae Sep 1, 2026
31c3ee2
test(reconciliation): expose public cross-family race
seonghobae Sep 1, 2026
1e45ea8
fix(reconciliation): normalize public identity races
seonghobae Sep 1, 2026
2a2e25a
test(reconciliation): preserve unrelated unique violations
seonghobae Sep 1, 2026
24c766b
fix(reconciliation): normalize shared identity at command boundary
seonghobae Sep 1, 2026
395c856
fix(reconciliation): share identity conflict boundary
seonghobae Sep 1, 2026
ec6eade
refactor(reconciliation): use shared command boundary
seonghobae Sep 1, 2026
2706b0d
test(reconciliation): target shared conflict boundary
seonghobae Sep 1, 2026
cb299a1
test(reconciliation): reject raw exception resolution authority
seonghobae Sep 1, 2026
61d029a
fix(reconciliation): fail closed on unauthoritative exception resolution
seonghobae Sep 1, 2026
f6787a5
test(reconciliation): align exception membership with fail-closed aut…
seonghobae Sep 1, 2026
3e93152
test(reconciliation): require command authority for terminal exceptions
seonghobae Sep 1, 2026
6666e0f
fix(reconciliation): enforce exception authority in PostgreSQL lifecycle
seonghobae Sep 1, 2026
48a1857
test(reconciliation): prove database blocks raw exception authority
seonghobae Sep 1, 2026
919d868
test(reconciliation): require database-owned transition snapshot
seonghobae Sep 2, 2026
e30f39b
fix(reconciliation): derive transition authority in PostgreSQL
seonghobae Sep 2, 2026
88f4a43
fix(reconciliation): install database snapshot authority overlay
seonghobae Sep 2, 2026
7ca3bdc
docs(reconciliation): trace database snapshot authority repair
seonghobae Sep 2, 2026
88634b9
ci: preserve protected-base docs queue repair
seonghobae Sep 3, 2026
aced5dd
merge: restack lifecycle on current reconciliation root
seonghobae Sep 3, 2026
bee71af
fix(reconciliation): preserve base migration errors
seonghobae Sep 6, 2026
423acd4
fix(reconciliation): preserve migration preflight atomicity
seonghobae Sep 6, 2026
4ff1778
fix(reconciliation): make snapshot authority migration unique
seonghobae Sep 6, 2026
805b34d
test(migrations): ratchet unique ordered identities
seonghobae Sep 6, 2026
4f219a4
docs(readme): align migration chain with canonical 0020
seonghobae Sep 6, 2026
3c18047
fix(readme): restore license after migration-chain repair
seonghobae Sep 6, 2026
11e6e70
fix(migrations): preserve released 0020 identity
seonghobae Sep 6, 2026
ddae338
fix(migrations): preflight released completion before snapshot authority
seonghobae Sep 6, 2026
1e28c7f
docs(readme): name canonical 0021 snapshot authority
seonghobae Sep 6, 2026
c9994b5
fix(migrations): restore released completion evidence
seonghobae Sep 6, 2026
fd785df
test(migrations): bind snapshot authority to canonical 0021
seonghobae Sep 6, 2026
1e43d77
docs(doctoring): trace canonical 0020 to 0021 repair
seonghobae Sep 6, 2026
a9f0696
fix(migrations): make 0020 an explicit lifecycle successor marker
seonghobae Sep 6, 2026
f079084
fix(migrations): execute 0020 successor before 0021 authority
seonghobae Sep 6, 2026
33909bc
test(reconciliation): ratchet completion successor authority
seonghobae Sep 6, 2026
d2a259b
docs(doctoring): record single-writer lifecycle succession
seonghobae Sep 6, 2026
0070cac
merge: adopt current reconciliation root
seonghobae Sep 7, 2026
9214c05
test: expose lifecycle snapshot lock-order race
seonghobae Sep 7, 2026
dab17c4
fix: admit lifecycle lock before authority snapshot
seonghobae Sep 7, 2026
4ae5614
test: cover lifecycle lock lease cleanup edges
seonghobae Sep 7, 2026
00f09c0
docs: doctor lifecycle snapshot lock admission
seonghobae Sep 7, 2026
71e371d
docs: correct lifecycle snapshot concurrency semantics
seonghobae Sep 7, 2026
ac592bd
test: align lifecycle doubles with transaction lease protocol
seonghobae Sep 7, 2026
2e2a5b9
test: keep transition-hash double faithful to lease protocol
seonghobae Sep 7, 2026
49244be
test: prove lifecycle snapshot refresh after lock wait
seonghobae Sep 7, 2026
91e603e
test: preserve canonical reconciliation cutoff fixture
seonghobae Sep 7, 2026
f5f6690
docs: restore canonical gap-baseline single writer
seonghobae Sep 7, 2026
55e48f2
test: restore canonical product-gap contract
seonghobae Sep 7, 2026
07565ef
test: align reconciliation identity fake
seonghobae Sep 7, 2026
08d6872
test: reconstruct pre-0019 reconciliation command catalog
seonghobae Sep 7, 2026
2004f05
test: seed reconciliation opening book authority
seonghobae Sep 7, 2026
14bb3d6
test: hash reconciliation opening-book source facts
seonghobae Sep 7, 2026
4bc4945
test: assert database-owned reconciliation populations
seonghobae Sep 7, 2026
cb50da8
test: cover reconciliation authority fail-closed edges
seonghobae Sep 7, 2026
56c6a32
test(reconciliation): exercise markerless 23505 normalization
seonghobae Sep 7, 2026
c4c6547
test(reconciliation): prove missing currency blocks transition write
seonghobae Sep 7, 2026
2197476
test(reconciliation): assert database-owned close projection
seonghobae Sep 7, 2026
d8d82da
test(reconciliation): require UTC snapshot timestamp canonicalization
seonghobae Sep 7, 2026
8a0169c
fix(reconciliation): canonicalize snapshot timestamps to UTC
seonghobae Sep 7, 2026
bbe6649
test(reconciliation): prove snapshot hashes ignore session timezone
seonghobae Sep 7, 2026
dae868c
test(reconciliation): require lifecycle outbox at commit
seonghobae Sep 7, 2026
22f3cd0
fix(reconciliation): bind reconciled state to outbox evidence
seonghobae Sep 7, 2026
a6a99f2
test(reconciliation): cover lifecycle outbox binding and immutability
seonghobae Sep 7, 2026
94bf38d
test(reconciliation): pin lifecycle outbox database contract
seonghobae Sep 7, 2026
baf5b47
docs(reconciliation): align lifecycle ADR with database authority
seonghobae Sep 7, 2026
b37c161
test(reconciliation): isolate status-pair invariant
seonghobae Sep 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:
jobs:
exact-head-sast:
name: Exact-head SAST
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

exact-head-security:
name: Exact-head security
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
exact-head-dependency-diff:
name: Exact-head dependency diff
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:

accounting-foundation:
name: Accounting foundation
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 20
permissions:
contents: read
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:
name: Integrated-head attestations
if: github.event_name == 'push'
needs: accounting-foundation
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ factory/runner and provide the tenant-bound host boundary explicitly.
`unittest` discovery also runs `tests/test_postgres_posting.py`, which needs a
reachable PostgreSQL 18 instance and `ACCOUNTING_DATABASE_URL` (CI uses
`postgresql://postgres:postgres@127.0.0.1:5432/accounting_test` and applies
the checked-in migration chain through `database/migrations/0020_reconciliation_run_completion_evidence.sql`). Persistence is still
the checked-in migration chain through `database/migrations/0021_reconciliation_run_database_snapshot_authority.sql`). Persistence is still
local to this repository; it is not a Naruon or sibling checkout.

Optional import smoke after the editable install above:
Expand Down
16 changes: 16 additions & 0 deletions database/migrations/0016_reconciliation_approval_evidence.sql
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,22 @@ BEGIN
END IF;
END IF;

-- Superseded is a historical overlay on an already reviewed decision, not
-- an alternate terminal state that can skip decision evidence. New matches
-- and proposed matches therefore cannot jump directly to superseded.
IF NEW.match_status_code = 'superseded' THEN
IF TG_OP <> 'UPDATE' THEN
RAISE EXCEPTION
'reconciliation match may be superseded only from approved or rejected reviewed evidence (reconciliation_supersede_requires_reviewed_decision)'
USING ERRCODE = '23514';
END IF;
IF OLD.match_status_code NOT IN ('approved', 'rejected', 'superseded') THEN
RAISE EXCEPTION
'reconciliation match may be superseded only from approved or rejected reviewed evidence (reconciliation_supersede_requires_reviewed_decision)'
USING ERRCODE = '23514';
END IF;
END IF;

IF TG_OP = 'UPDATE'
AND OLD.match_status_code IN ('approved', 'rejected', 'superseded') THEN
IF NEW.approved_at IS DISTINCT FROM OLD.approved_at THEN
Expand Down
16 changes: 16 additions & 0 deletions database/migrations/0017_reconciliation_approval_lock_order.sql
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,22 @@ BEGIN
END IF;
END IF;

-- Superseded is a historical overlay on an already reviewed decision, not
-- an alternate terminal state that can skip decision evidence. New matches
-- and proposed matches therefore cannot jump directly to superseded.
IF NEW.match_status_code = 'superseded' THEN
IF TG_OP <> 'UPDATE' THEN
RAISE EXCEPTION
'reconciliation match may be superseded only from approved or rejected reviewed evidence (reconciliation_supersede_requires_reviewed_decision)'
USING ERRCODE = '23514';
END IF;
IF OLD.match_status_code NOT IN ('approved', 'rejected', 'superseded') THEN
RAISE EXCEPTION
'reconciliation match may be superseded only from approved or rejected reviewed evidence (reconciliation_supersede_requires_reviewed_decision)'
USING ERRCODE = '23514';
END IF;
END IF;

IF TG_OP = 'UPDATE'
AND OLD.match_status_code IN ('approved', 'rejected', 'superseded') THEN
IF NEW.approved_at IS DISTINCT FROM OLD.approved_at THEN
Expand Down
Loading