Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b3ac629
fix: reject non-finite policy and report numbers
sftimeless Nov 7, 2026
08bb694
fix: require timezone-aware RFC 3339 policy timestamps
sftimeless Nov 7, 2026
ce85e36
fix: scan feedback array strings and portable source paths
sftimeless Nov 7, 2026
523f069
fix: reject fieldless policy condition trees
sftimeless Nov 7, 2026
d8d3680
fix: bind approval requirements to one typed approver selector
sftimeless Nov 7, 2026
3be527d
fix: require exact destination confirmation before loopback key entry
sftimeless Nov 7, 2026
ed9b413
fix: bound and contain all setup state file operations
sftimeless Nov 7, 2026
2099ccc
fix: render only fixed local protocol error codes
sftimeless Nov 7, 2026
1b39439
fix: keep source diffs and literal defaults out of setup output
sftimeless Nov 7, 2026
5250a29
fix: refuse symlink mutation targets before setup edits
sftimeless Nov 7, 2026
382cb65
fix: reject executable caches in fallback release verification
sftimeless Nov 7, 2026
7897ca1
fix: refuse transformations that could discard unrecognized logic
sftimeless Nov 7, 2026
e2decca
fix: revalidate prepared state against HEAD and every current change
sftimeless Nov 7, 2026
68bc43e
fix: validate implicit action facts and fail closed on unpublished ca…
sftimeless Nov 7, 2026
b4b6520
fix: bind enforceability evidence and readback to exact policy rules
sftimeless Nov 7, 2026
1e0dfd1
fix: bound aggregate repository inspection and source comparisons
sftimeless Nov 7, 2026
3c1b2b2
fix: refuse overlapping source lines during adapter transformation
sftimeless Nov 7, 2026
3f428ac
fix: treat prepared paths as literal filenames during resume
sftimeless Nov 7, 2026
b4de8f5
fix: preserve source permissions during no-follow atomic edits
sftimeless Nov 7, 2026
4c2cb23
fix: enforce finite numbers for explicit-root validator calls
sftimeless Nov 7, 2026
8caea38
test: give fixture commits an explicit git identity
sftimeless Nov 7, 2026
6293ea3
fix: sync the bundle with its reviewed source after both security passes
sftimeless Nov 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
48 changes: 25 additions & 23 deletions SHA256SUMS
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,50 @@ b97a81728fc0d91f066bb92f27695c81f9bb25bd88d93bf470230132f33d0799 .github/workfl
b63eff93f485d563b24680091496a39b3a62ecf3c8bb229cfc4eecd80c7e2262 .gitignore
3c0871d9b30c3e9647426b5b756be7dbfc5eee8728e6f0e0c371385de7c5f8f7 LICENSE
89e7fa8c08b6ada7931706085c33924173454fc51b866cb6726f8976d030e715 README.md
b273423034914ee3c6599e3c780551f70bc8fef51f72a636f839810e82c3bacf SOURCE.json
75fb04d3079e5ca96e0d7e66e8de9525ab638f6f1c9fa6f49bbf7949dbd5f1a2 keel-policy/SKILL.md
dcbb4164927a68d4c0428b2eb4926d7c8b30fd3c986c9acd8bd4d37a51f6fb56 SOURCE.json
227c399c3ab3a7317982f709a151efd7705c4d30ddc96fdf31c62302f0faccd3 keel-policy/SKILL.md
6b449605b6b4fe6eb84f5b12befb90a57b7841d2973bbf9341cf40866e7dd81a keel-policy/examples/README.md
9a13b533704c1a37734bd6c28fc202c7acdaa8335773d55790dac50a693f8b2b keel-policy/examples/stripe-refund-approval-enterprise.json
2a52514e8db0901ab73e59b924f195008541d0069ebad9b514bd373cb905e2d2 keel-policy/examples/stripe-refund-approval.json
4ba18a72ba701fd0f21c8c341676bbbe823728fa7b286c97109df02b81b47936 keel-policy/reference/enforceability-report.schema.json
49f43e551f32e484e263fa026dfd4fde5a8b50cd462f0f68e06ae371380f3b24 keel-policy/reference/enforceability-report.schema.json
91fa5bbc7696846ec0d0039a88585ac99852b50a73613f92fea552f6931e7c44 keel-policy/reference/field-provenance.json
54416bf9c9af8f8fb75a9e883aa27aa62ecbcdffc2b1b6698d5fa1479fd6ddda keel-policy/reference/fields.md
4be41a65667952df8105e627026a921b66fc4fef19761242efabe69df0bd47cf keel-policy/reference/policy-document.schema.json
9d86eeb4fecf6db831856c0b77b9e83caeb161ec82d046eaf4fc2f8e73d96f27 keel-policy/reference/policy-document.schema.json
7d662cffa24744af7a26f62d813127b4bc0a44ff62f725c883054165ddec3272 keel-policy/scripts/consume_authoring_context.py
188570c6787d720b8811a36382843b09f31bb37da78448c2a905fef2345511c9 keel-policy/scripts/validate_enforceability_report.py
b5711d319ef939c7522df53ffc3dea7c4dcc371537dff4cc7307f2a4bc59dffb keel-policy/tests/test_authoring_context_consumption.py
d8a8ad9886f43efb6b5b7065ef167150b2c8b03f640cc8647f52680ae211e2eb keel-policy/scripts/validate_enforceability_report.py
ff71e2933eb4ab5be18d5fa41eb324a376ffd460c39157ecd6db39bfc016ee44 keel-policy/tests/test_authoring_context_consumption.py
820069a6ce02f74dccc4f57a5788359b1377520330d00ba88471d60fec901f17 keel-policy/tests/test_basic_profile_fields.py
322b430367e859dae341e9c225be34c6c5272c481074e7b1ae2242db527e1cbe keel-policy/tests/test_validate_enforceability_report.py
80624280a7ec0bd0273fcd37ffc9dec14003bb84b6e470a8b1e7f59f530a825f keel-setup/SKILL.md
7c061516afc0a8618bf9f3b02bdd907678447047c268f82a2d1579cb3d2bd84c keel-policy/tests/test_validate_enforceability_report.py
5aba155e2711a4bfd0241ce41ca97982effe53473764e669bcdfe9ea47aed4a7 keel-setup/SKILL.md
2b9c2490e921e83b83372a09e422a30f0f7ee338a2809b8e07edbd381d9eb650 keel-setup/reference/coverage.schema.json
70a69dcab29f61aaa3f96de5f65854fca63c4549ddc20d84ee00e102fc68c691 keel-setup/reference/integration_profiles.v1.json
9739501499b286d40f356af9c0378bbdcde41a364be083ccbc34adb000575160 keel-setup/reference/setup-state.schema.json
7ef2361f3f10601f9a4d3681d04c8538836c37448787262b26e82bf18bcbbc70 keel-setup/reference/unified-execute-request.contract.json
c43e742a342ea24a086f99a8745a6d14f240a333286baa475a2b7a94eb79a558 keel-setup/reference/voice-gateway.md
4f54094b796b1e58591706a44b54b73626b374a5ce7892f5c8ed0509c8fb2372 keel-setup/scripts/authoring_context.py
88d28844fff3cb1984649fafad9cc59950ea6e604adb0a12e98b7039b60b6150 keel-setup/scripts/fast_first_run.py
856bd9214031a15df2940aecc81001318cbb941d219595c31b234f2710baab03 keel-setup/scripts/inventory.py
580edac4805c13a2b88b7dde613bf3a388347c9d00c6f9488c1ceb9e593368d3 keel-setup/scripts/authoring_context.py
e7736b2abbb475472befa4a53cd1b7b5dd2c55318645472c74be6e56b43e57c4 keel-setup/scripts/fast_first_run.py
b81c2c37fe70176a006ef5e5b0904d06609d7a4ca8f3cababae652d9f2254a09 keel-setup/scripts/inventory.py
e23ef4558d00ba66ed599373de68930978bf3a36bcc60064b6800320b51b400e keel-setup/scripts/prepare_voice.py
7a3b9b74a8a9cf4515990fa3816924244d8d2328b8fbaf33dfeca0efb5ea28c5 keel-setup/scripts/setup_state.py
550d24c9ddfc03ad7f03b3acf32033b5055987a443c70807fd2d1593c91fa06c keel-setup/scripts/verify_execute.py
04f0dd71d74930ccb065202769f01f2afff559f395acc93937813f60a2793558 keel-setup/scripts/setup_state.py
1bc3d136fe06414a090976712c96fef0f46d7922ed3cd5cf502fa174de1aa86d keel-setup/scripts/verify_execute.py
d6638693e9cff6e01a82b304be447e42dd58b37ecce355c29938e378e67fab4a keel-setup/tests/fixtures/fast_first_run_cases.py
89eaed21a48503c3514b2ff336a5112da28ae21203e56d13444f0b79f6f8fcf1 keel-setup/tests/test_authoring_context.py
5566957697d9e33782af0ecd1037b0b661a8b32e365939ffb33d72abc93caf10 keel-setup/tests/test_authoring_context.py
a891810ef4370ab3107627c972cfd66f18fa9554f5f2ff857312f0756c15a4f7 keel-setup/tests/test_execute_request_contract.py
cb78b2d62beefee4aeea712fdcbabb4e0e633eb17c118e6fdbf06809aaa3b214 keel-setup/tests/test_fast_first_run.py
62539baf2054b24c04730d6805ed63baa257981ffd1641c9e42def090910fb8e keel-setup/tests/test_inventory.py
6cb0fbad8e3e34ca65087c02f5498375cf91be7d86b0697401fcae27af4d89e0 keel-setup/tests/test_fast_first_run.py
9c3b0e8727848dfb52b499236b31c9a43e2a0649452c3df6783207ee12073c92 keel-setup/tests/test_inventory.py
a7a734c7a346ed297b4cbf412382269d3027df5441a3f48196b12a693ea664ca keel-setup/tests/test_post_proof_handoff.py
af96ae9a32e470a2c1390ec452c13ae1c3657d7ed54c99925b0a57501503894b keel-setup/tests/test_prepare_voice.py
87501ed31e812234f453de338d697848c84e1b21a036afd2eb3221acfb0a12a3 keel-setup/tests/test_setup_state.py
e759ec5d797ca0101f81cd23e66b63229d0e55da463625b488a12a9a64758716 keel-setup/tests/test_verify_execute.py
c8006372327167f6317d7ae41d79da3c2dd45a7510f1cdc544616facd27d9d83 keel-setup/tests/test_setup_state.py
ea797a44c033a6ce519b82595c858cdb0879868854b949226792f3bffe2d4ba3 keel-setup/tests/test_verify_execute.py
ba172f0dcadea1b19f3279e3c3151dabc1719cdc65ddce77eb5c74550c101ce0 scripts/check_execute_contract.py
155a5dbbfe0423bb54ac1fb7d4bb1b1b3f6a91d920221d6d15b205b5689dc93e scripts/check_release_bundle.py
964fd01c1ac92ddb340e5afd068647f8f42c2c1c9185af8779c68ad9d7351eba scripts/check_release_bundle.py
e0195765e2b9a31938a455fc81f93b02127f7b769948607b19a821f2bd82b2d1 shared/CONSTITUTION.md
6510e9f92c2a8fa3c40a2ca99eca06e2acaad146101c9526e06bb53f18085421 shared/feedback-report.schema.json
67ef5250861a9f1f3f2c3671205adc12dfa2e049ffd68449b78337d2ac490727 shared/feedback-report.template.md
82ffbacd09255c9311813cec37bd75d745df16ec21f457542ec5cd3b30739014 shared/scripts/schema_validation.py
7fef855399e1c4b7372d235c1d0fa3567583c4d428e8ee9f5cf122f596dd11e7 shared/scripts/test_schema_validation.py
c7ad8aa74f5325b8bad0a44c979e4089cf3f57da787c209ed5d9cb71c7aaac1d shared/scripts/test_validate_feedback_report.py
ca5cb3890f97d49affc5be7a15ba2c1a1859ca9afd459eeb6358fa27cbb05372 shared/scripts/validate_feedback_report.py
378cd5a1c96810c36054553bde92c137deceec890a5c046a8e8d9a7bfecce51b shared/scripts/bounded_input.py
e64ed436bc35d73cdad6366f2dd3f01530426cb529237d2990be07171c93b08c shared/scripts/schema_validation.py
0e15d2320554d19fddd24299afc807317c6313d7cd96c6fe0fd3dbaf25558fad shared/scripts/test_bounded_input.py
4cbb3be5a54865a85549400f7c57610a7284623899674c0902354b870b1980ad shared/scripts/test_schema_validation.py
8f7c8bfd8ec6bc7faab7ea1341365ba67f31846232a2c3acac5f7c4bdaa3c411 shared/scripts/test_validate_feedback_report.py
696a0c609ef7895cfe3737942dc4e32feeeb870bbd23689fbeee965752498587 shared/scripts/validate_feedback_report.py
2d92172fe932ee0a39c7fc97dbd15f579fb21aa93adef40f53899472781481b3 tools/public_surface.json
2 changes: 1 addition & 1 deletion SOURCE.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"bundle_schema_version": "keel.public_setup_bundle.v1",
"public_release_version": "2026-10-22.1",
"product_source_sha256": "513568419e76edf18ee1fa494d7c080ecb8ce96f9dfb9832aed6a1334edfe719",
"product_source_sha256": "7481bc4de5400d2dd00af9cbe6c449d090dac7806a90fdb7d144e65195bdf293",
"included_roots": [
"keel-policy",
"keel-setup",
Expand Down
28 changes: 26 additions & 2 deletions keel-policy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,42 @@ Choose one explicit mode and keep one intent ledger across it:

Each handoff contains: the human intent, policy JSON when one can be drafted faithfully, an
evaluation-order readback, an enforceability report, the activation effect (`narrows`, `widens`,
`ambiguous`, `unchanged`, or `unresolved`), blocked requests, and the exact human next step. Validate an
enforceability report with `scripts/validate_enforceability_report.py`. A blocked report is a successful
`ambiguous`, `unchanged`, or `unresolved`), blocked requests, and the exact human next step. Check an
enforceability report with `scripts/validate_enforceability_report.py`. For an embedded policy, use
`rules[0]`, `rules[1]`, and so on as exact rule references, with one entry for each fact consumed by
each rule. The machine report's `readback` must equal the validator's `derive_readback(policy)`;
keep any additional friendly explanation outside that validated field. `safe_outcome` must agree
with the referenced action. Actions whose implicit runtime facts or capabilities lack a pinned trusted
evidence contract cannot pass offline enforceability qualification; report the missing contract
instead of claiming support. Beyond those structural bindings, this helper checks schema and field
provenance only; it does not verify outcomes, readback meaning, rule ordering, activation deltas, or
runtime enforcement. Every report must set `validation_scope` to `schema_and_field_provenance_only`,
`unverified_claims` to `["safe_outcome", "readback", "rule_order", "activation_effect", "runtime_enforcement"]`,
and `activation_effect` to `unresolved`, because no authenticated active-policy baseline exists offline.
Human `intent` remains a declaration for human review, not a proved policy effect. Treat `safe_outcome`
and readback as unverified author claims. Never use a passing helper result as approval to activate
or as proof a restriction is enforced. A blocked report is a successful
diagnosis; never change the requested restriction to make validation pass.

Every non-null embedded `policy` is validated against the committed
`reference/policy-document.schema.json`; a legacy or approximate `when`/`decision` shape is not a
policy proposal and must fail closed before the enforceability cross-check.

Offline report input is limited to a regular file of 1,000,000 bytes, 24 nesting levels,
10,000 nodes, and 1,000 children per container. Schema validation has a 50,000-step
work budget and returns at most 50 schema failures. Split larger proposals before validation.

The validator reads `reference/field-provenance.json`, a release-pinned machine artifact whose field
set and provenance values are checked against the published catalog. A report cannot promote a caller-
or connector-asserted field to `trusted` by relabelling it.

Report surfaces are closed identifiers: `managed_execute`, `managed_mcp`, `realtime`, or `voice`.
The offline helper conservatively admits trusted `provider` and `model` only on `managed_execute`,
and trusted connector identity/tool name only on `managed_mcp`. Other field/surface combinations
remain unresolved until the pinned availability contract is extended with route evidence. In
particular, connector tool name is unavailable on `realtime` and `voice`; mark it unavailable or
unresolved and block restrictions that depend on it. Provenance alone never establishes availability.

1. **Get the authoring profile.** With a safe authoring-context v2 JSON block, validate it
using the offline intake below and use its `authoring_level`: `template`, `basic`, or `full`.
Never ask which policy editor the human sees, ask them to infer their authoring level, or
Expand Down
10 changes: 6 additions & 4 deletions keel-policy/reference/enforceability-report.schema.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://keelapi.com/schemas/enforceability-report.v1.json",
"title": "Keel policy enforceability report",
"title": "Keel policy schema and field-provenance report",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "intent", "policy", "readback", "enforceability", "activation_effect", "blocked_requests", "human_next_step"],
"required": ["schema_version", "validation_scope", "unverified_claims", "intent", "policy", "readback", "enforceability", "activation_effect", "blocked_requests", "human_next_step"],
"properties": {
"schema_version": {"const": "1.0"},
"validation_scope": {"const": "schema_and_field_provenance_only"},
"unverified_claims": {"const": ["safe_outcome", "readback", "rule_order", "activation_effect", "runtime_enforcement"]},
"intent": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1, "maxLength": 1000}, "maxItems": 100},
"policy": {"type": ["object", "null"]},
"readback": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1, "maxLength": 2000}, "maxItems": 200},
Expand All @@ -21,7 +23,7 @@
"rule_reference": {"type": "string", "minLength": 1, "maxLength": 256},
"required_fact": {"type": "string", "minLength": 1, "maxLength": 512},
"field": {"type": ["string", "null"], "maxLength": 512},
"surface": {"type": "string", "minLength": 1, "maxLength": 128},
"surface": {"enum": ["managed_execute", "managed_mcp", "realtime", "voice"]},
"provenance": {"enum": ["keel_derived", "connector_asserted", "caller_asserted", "human_asserted", "unavailable", "unresolved"]},
"status": {"enum": ["trusted", "untrusted", "unavailable", "unresolved"]},
"safe_outcome": {"enum": ["auto_allow", "review", "deny", "proposal_only", "blocked"]},
Expand All @@ -30,7 +32,7 @@
}
}
},
"activation_effect": {"enum": ["narrows", "widens", "ambiguous", "unchanged", "unresolved"]},
"activation_effect": {"const": "unresolved"},
"blocked_requests": {
"type": "array",
"maxItems": 200,
Expand Down
Loading
Loading