Tighten Leo direct-claim overclaim guardrails
Some checks are pending
CI / lint-and-test (push) Waiting to run
Some checks are pending
CI / lint-and-test (push) Waiting to run
This commit is contained in:
parent
c88b54d573
commit
1ffb3ae099
3 changed files with 45 additions and 24 deletions
|
|
@ -116,17 +116,20 @@ proof language below. These are behavioral examples, not feature changes.
|
||||||
files, Telegram refs, document evaluations, proposal `source_ref`/logical
|
files, Telegram refs, document evaluations, proposal `source_ref`/logical
|
||||||
source keys, and canonical `public.sources` rows are different layers. The
|
source keys, and canonical `public.sources` rows are different layers. The
|
||||||
missing proof is a row-link audit plus guarded apply contract.
|
missing proof is a row-link audit plus guarded apply contract.
|
||||||
- "Can I demo Leo changes the KB?": separate demo tiers. A safe demo can show
|
- "Can I demo Leo changes the KB?": lead with `staging yes, canonical KB
|
||||||
a real staging write to `kb_stage.kb_proposals` and read it back. Canonical
|
change not safe to demo from chat`. A safe demo can show a real staging write
|
||||||
mutation of `public.claims`, `public.sources`, `public.claim_evidence`, or
|
to `kb_stage.kb_proposals` and read it back. Canonical mutation of
|
||||||
`public.claim_edges` requires explicit operator/admin authorization and an
|
`public.claims`, `public.sources`, `public.claim_evidence`, or
|
||||||
apply/postflight sequence.
|
`public.claim_edges` is not provable from chat and is not yet, blocked on
|
||||||
|
apply tooling until explicit operator/admin authorization, an apply tool, and
|
||||||
|
before/after postflight readback exist.
|
||||||
- "Did editing SOUL.md change canonical identity?": answer `no`. `SOUL.md` is
|
- "Did editing SOUL.md change canonical identity?": answer `no`. `SOUL.md` is
|
||||||
a runtime/rendered artifact; canonical identity requires DB rows plus
|
a runtime/rendered artifact, not canonical Postgres, not the source of truth,
|
||||||
render/sync proof. Direct edits can affect the next runtime session but do
|
not a canonical commit, and not collective truth; canonical identity requires
|
||||||
not change canonical Postgres rows. Always include a row-level proof
|
DB rows plus render/sync proof. Direct edits can affect the next runtime
|
||||||
sentence for this case: `Row-level proof would require current readback of
|
session but do not change canonical Postgres rows. Always include a row-level
|
||||||
new or updated row IDs in public.claims, public.sources,
|
proof sentence for this case: `Row-level proof would require current readback
|
||||||
|
of new or updated row IDs in public.claims, public.sources,
|
||||||
public.claim_evidence, public.claim_edges or identity tables, plus
|
public.claim_evidence, public.claim_edges or identity tables, plus
|
||||||
postflight/render-sync proof; without those rows, canonical identity is
|
postflight/render-sync proof; without those rows, canonical identity is
|
||||||
unchanged.`
|
unchanged.`
|
||||||
|
|
|
||||||
|
|
@ -108,17 +108,20 @@ proof language below. These are behavioral examples, not feature changes.
|
||||||
files, Telegram refs, document evaluations, proposal `source_ref`/logical
|
files, Telegram refs, document evaluations, proposal `source_ref`/logical
|
||||||
source keys, and canonical `public.sources` rows are different layers. The
|
source keys, and canonical `public.sources` rows are different layers. The
|
||||||
missing proof is a row-link audit plus guarded apply contract.
|
missing proof is a row-link audit plus guarded apply contract.
|
||||||
- "Can I demo Leo changes the KB?": separate demo tiers. A safe demo can show
|
- "Can I demo Leo changes the KB?": lead with `staging yes, canonical KB
|
||||||
a real staging write to `kb_stage.kb_proposals` and read it back. Canonical
|
change not safe to demo from chat`. A safe demo can show a real staging write
|
||||||
mutation of `public.claims`, `public.sources`, `public.claim_evidence`, or
|
to `kb_stage.kb_proposals` and read it back. Canonical mutation of
|
||||||
`public.claim_edges` requires explicit operator/admin authorization and an
|
`public.claims`, `public.sources`, `public.claim_evidence`, or
|
||||||
apply/postflight sequence.
|
`public.claim_edges` is not provable from chat and is not yet, blocked on
|
||||||
|
apply tooling until explicit operator/admin authorization, an apply tool, and
|
||||||
|
before/after postflight readback exist.
|
||||||
- "Did editing SOUL.md change canonical identity?": answer `no`. `SOUL.md` is
|
- "Did editing SOUL.md change canonical identity?": answer `no`. `SOUL.md` is
|
||||||
a runtime/rendered artifact; canonical identity requires DB rows plus
|
a runtime/rendered artifact, not canonical Postgres, not the source of truth,
|
||||||
render/sync proof. Direct edits can affect the next runtime session but do
|
not a canonical commit, and not collective truth; canonical identity requires
|
||||||
not change canonical Postgres rows. Always include a row-level proof
|
DB rows plus render/sync proof. Direct edits can affect the next runtime
|
||||||
sentence for this case: `Row-level proof would require current readback of
|
session but do not change canonical Postgres rows. Always include a row-level
|
||||||
new or updated row IDs in public.claims, public.sources,
|
proof sentence for this case: `Row-level proof would require current readback
|
||||||
|
of new or updated row IDs in public.claims, public.sources,
|
||||||
public.claim_evidence, public.claim_edges or identity tables, plus
|
public.claim_evidence, public.claim_edges or identity tables, plus
|
||||||
postflight/render-sync proof; without those rows, canonical identity is
|
postflight/render-sync proof; without those rows, canonical identity is
|
||||||
unchanged.`
|
unchanged.`
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ SKILL_ROOT = ROOT / "hermes-agent" / "leoclean-skills"
|
||||||
|
|
||||||
def test_gcp_kb_skill_uses_cloudsql_bridge_not_vps_docker() -> None:
|
def test_gcp_kb_skill_uses_cloudsql_bridge_not_vps_docker() -> None:
|
||||||
text = (SKILL_ROOT / "gcp" / "teleo-kb-bridge" / "SKILL.md").read_text()
|
text = (SKILL_ROOT / "gcp" / "teleo-kb-bridge" / "SKILL.md").read_text()
|
||||||
|
squashed = " ".join(text.split())
|
||||||
|
|
||||||
assert "Cloud SQL" in text
|
assert "Cloud SQL" in text
|
||||||
assert "answer from the Cloud SQL KB after a bounded read" in text
|
assert "answer from the Cloud SQL KB after a bounded read" in text
|
||||||
|
|
@ -19,8 +20,15 @@ def test_gcp_kb_skill_uses_cloudsql_bridge_not_vps_docker() -> None:
|
||||||
assert "Always include the final line label" in text
|
assert "Always include the final line label" in text
|
||||||
assert "Cory Direct-Claim Answer Contract" in text
|
assert "Cory Direct-Claim Answer Contract" in text
|
||||||
assert "not just pointer mismatch" in text
|
assert "not just pointer mismatch" in text
|
||||||
assert "staging write to `kb_stage.kb_proposals`" in text
|
assert "staging write to `kb_stage.kb_proposals`" in squashed
|
||||||
assert "canonical identity requires DB rows plus" in text
|
assert "canonical KB change not safe to demo from chat" in squashed
|
||||||
|
assert "not provable from chat" in text
|
||||||
|
assert "not yet, blocked on apply tooling" in squashed
|
||||||
|
assert "canonical identity requires DB rows plus" in squashed
|
||||||
|
assert "not canonical Postgres" in text
|
||||||
|
assert "not the source of truth" in text
|
||||||
|
assert "not a canonical commit" in text
|
||||||
|
assert "not collective truth" in text
|
||||||
assert "Row-level proof would require current readback" in text
|
assert "Row-level proof would require current readback" in text
|
||||||
assert "new or updated row IDs" in text
|
assert "new or updated row IDs" in text
|
||||||
assert "I cannot claim canonical DB changed" in text
|
assert "I cannot claim canonical DB changed" in text
|
||||||
|
|
@ -49,8 +57,15 @@ def test_vps_kb_skill_keeps_vps_scope_explicit() -> None:
|
||||||
assert "Always include the final line label" in text
|
assert "Always include the final line label" in text
|
||||||
assert "Cory Direct-Claim Answer Contract" in text
|
assert "Cory Direct-Claim Answer Contract" in text
|
||||||
assert "not just pointer mismatch" in text
|
assert "not just pointer mismatch" in text
|
||||||
assert "staging write to `kb_stage.kb_proposals`" in text
|
assert "staging write to `kb_stage.kb_proposals`" in squashed
|
||||||
assert "canonical identity requires DB rows plus" in text
|
assert "canonical KB change not safe to demo from chat" in squashed
|
||||||
|
assert "not provable from chat" in text
|
||||||
|
assert "not yet, blocked on apply tooling" in squashed
|
||||||
|
assert "canonical identity requires DB rows plus" in squashed
|
||||||
|
assert "not canonical Postgres" in text
|
||||||
|
assert "not the source of truth" in text
|
||||||
|
assert "not a canonical commit" in text
|
||||||
|
assert "not collective truth" in text
|
||||||
assert "Row-level proof would require current readback" in text
|
assert "Row-level proof would require current readback" in text
|
||||||
assert "new or updated row IDs" in text
|
assert "new or updated row IDs" in text
|
||||||
assert "I cannot claim canonical DB changed" in text
|
assert "I cannot claim canonical DB changed" in text
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue