teleo-infrastructure/docs/reports/leo-working-state-20260709/cross-surface-delete-rollback.sql
twentyOne2x f34feb0ffb
Some checks are pending
CI / lint-and-test (push) Waiting to run
Add Working Leo cross-surface KB proof
- Add broad Cory-style outcome scenarios to the open-ended benchmark so regular-use ambiguity is tested, not only exact ID canaries.

- Add a clone-proven cross-surface strategy anchor packet that updates the mapped rich proposal anchor only after Claim D exists.

- Retain VPS Docker DB, claim/body metadata, and cross-surface proof reports with ruff plus 37 focused tests passing.

`docs/reports/leo-working-state-20260709/cory-expected-working-leo-outcomes-20260709.md`

`docs/reports/leo-working-state-20260709/cross-surface-apply-authorized-commit.sql`

`docs/reports/leo-working-state-20260709/cross-surface-clone-rehearsal-current.log`

`docs/reports/leo-working-state-20260709/cross-surface-clone-rehearsal-failed-source-id-constraint.log`

`docs/reports/leo-working-state-20260709/cross-surface-delete-rollback.sql`

`docs/reports/leo-working-state-20260709/cross-surface-packet.json`

`docs/reports/leo-working-state-20260709/cross-surface-postflight.sql`

`docs/reports/leo-working-state-20260709/cross-surface-preflight.sql`

`docs/reports/leo-working-state-20260709/cross-surface-resolution-current.md`

`docs/reports/leo-working-state-20260709/current-truth-index.md`

`docs/reports/leo-working-state-20260709/leo-db-state-17-cory-outcome-benchmark.svg`

`docs/reports/leo-working-state-20260709/leo-db-state-18-db-vs-workspace.svg`

`docs/reports/leo-working-state-20260709/leo-db-state-19-claims-body-metadata.svg`

`docs/reports/leo-working-state-20260709/leo-db-state-20-cross-surface-anchor.svg`

`docs/reports/leo-working-state-20260709/working-leo-current-state-20260709.md`

`docs/reports/leo-working-state-20260709/working-leo-definition-20260709.md`

`docs/reports/leo-working-state-20260709/working-leo-execution-plan-current.md`

`docs/reports/leo-working-state-20260709/working-leo-open-ended-benchmark-spec.json`

`scripts/kb_cross_surface_resolution_packet.py`

`scripts/working_leo_open_ended_benchmark.py`

`tests/test_kb_cross_surface_resolution_packet.py`

`tests/test_working_leo_open_ended_benchmark.py`
2026-07-09 23:39:51 +02:00

24 lines
823 B
PL/PgSQL

\set ON_ERROR_STOP on
begin;
do $$
declare
restored int;
begin
update public.strategy_node_anchors
set claim_id = 'd0000000-0000-0000-0000-000000000005'::uuid,
source_id = null,
weight = 0.7,
note = 'Telos/policy grounding approved by m3ta: capital allocation expresses priorities and must be coordinated with collective intelligence.'
where id = '47f128a0-36c5-4b60-97d4-48c32fa48bc7'::uuid
and from_node_id = '52bc4264-330e-489d-920c-a493fd2d985a'::uuid
and anchor_role = 'justified_by'
and claim_id = 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid;
get diagnostics restored = row_count;
if restored <> 1 then
raise exception 'cross-surface anchor rollback affected % row(s), expected 1; anchor was not at Claim D state', restored;
end if;
end $$;
commit;