Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@

**Detect a restored authority:** An [opt-in external checkpoint](pilots/action-boundary/AUTHORITY_CHECKPOINT.md) advances before grant, revocation, and claim records become usable. New protocol-3 stores commit to their decision files and authority mode, so a fresh worker refuses an older directory, a selectively restored revocation or spent marker, or a substituted mode while the separate anchor remains current. The included file anchor is still one-machine; restoring both copies together defeats this check.

**Inspect a blocked authority:** The [read-only inspection command](pilots/action-boundary/AUTHORITY_CHECKPOINT.md#inspect-before-reconciliation) reports a present lock, checkpoint mismatch, or altered decision files without changing the store. Its result supports operator investigation; it does not resolve an uncertain provider action.

**Design your own boundary:** [Open the Action Boundary Studio](https://aruintelligence.github.io/aml-core/action-boundary-studio.html). Edit the proposed action **and** the host policy, inspect the live plan and canonical digest, then download a JSON calculation bundle. `node scripts/verify-action-studio-bundle.mjs examples/action-studio/changed-destination.json` rechecks a published example against the policy included in that bundle; the [guide](pilots/action-boundary/ACTION_STUDIO.md) explains the limits. The verifier checks consistency, not policy ownership or a real approval.

[![Action Boundary Studio: editable proposal and policy produce a visible exact-rule decision and portable calculation bundle.](docs/action-studio-preview.svg)](https://aruintelligence.github.io/aml-core/action-boundary-studio.html)
Expand Down
16 changes: 15 additions & 1 deletion pilots/action-boundary/AUTHORITY_CHECKPOINT.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,22 @@ If the anchor refuses an advance, the local mutation and callback do not run. If

The protocol-3 check detects a **whole-directory rollback or selective change to committed decisions or mode** while its independent anchor remains current. It does not help if both copies are restored together, if the same actor can rewrite both stores, if clock or outcome records are changed, or if a tool bypasses this authority. The local file anchor shares the process's OS identity and is neither a multi-machine consensus system nor a trusted external witness. Its hashes authenticate neither the provider nor the approving person. A successful callback result still does not prove delivery. Production needs an anchor with an independently controlled retention and restore boundary plus a reviewed recovery procedure.

## Inspect before reconciliation

The read-only inspection command reports the pinned authority mode, observed authority lock and file-anchor lock, local and external checkpoint records, their agreement, and the protocol-2 or protocol-3 committed-state digest and decision-file counts:

```sh
node pilots/action-boundary/inspect-file-authority.mjs \
/absolute/private/authority /absolute/independent/anchor
```

The optional second argument is the file anchor directory. The command opens it with `create: false`; it never creates a missing anchor or authority directory. It exits zero for `observed_consistent` and 2 for a lock, mismatch, unreadable state, or other `needs_reconciliation` result. A present authority or anchor lock might belong to a live worker or a crashed one. `checkpoints.comparison` distinguishes a local/external mismatch; `committed_state.comparison` distinguishes a protocol-2 or protocol-3 state mismatch while the checkpoints still agree. `committed_state.includes_authority_mode` is true only for protocol 3. Protocol 1 reports `not_committed`, not a successful state verification. Omit the anchor only to inspect an unanchored store; an anchored local checkpoint without its anchor reports `authority_anchor_not_supplied`.

The command performs no unlock, mode initialization, checkpoint advance, grant issue, clock update, provider call, or recovery. A missing mode reports `authority_mode_missing`, including in an empty directory: a never initialized store cannot be distinguished from one whose mode was deleted. Its scan is not an atomic snapshot of live workers, and `observed_consistent` cannot establish provider delivery, an independently protected anchor or external claim backend, or permission to resume an uncertain operation. Preserve the records and reconcile the provider's operation and idempotency history before any operator-controlled recovery. `inspectFileRevocationHandoff({ directory, anchor })` exposes the same observation to a host without invoking the CLI.

Run the project-authored child-process and failure tests:

```sh
node --test test/action-boundary-file-authority-anchor.test.js
node --test test/action-boundary-file-authority-anchor.test.js \
test/action-boundary-file-authority-inspection.test.js
```
2 changes: 2 additions & 0 deletions pilots/action-boundary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ The first operation on a fresh, empty authority store writes a durable `authorit

**Detect a restored local snapshot:** [The opt-in checkpoint](AUTHORITY_CHECKPOINT.md) records issue, revoke, and claim transitions in a separate host-controlled anchor before their local records become usable. New protocol-3 stores bind their grant, epoch, operation, spent-claim, and mode records to that anchor. A child process with an older restored authority directory or selectively missing epoch or spent marker blocks before its simulated provider callback. Existing protocol-1 stores retain only whole-directory rollback detection; protocol-2 stores bind decision files but exclude mode. The bundled `createFileAuthorityAnchor` is a separate local file example, not an independently operated service; restoring both directories together still defeats this check. Anchored and unanchored workers cannot safely share one authority.

**Inspect a stranded authority:** The [read-only inspection command](AUTHORITY_CHECKPOINT.md#inspect-before-reconciliation) shows whether an authority lock exists, whether local and external checkpoints agree, and whether protocol-2 or protocol-3 committed state matches. It neither clears the lock nor changes any authority record. Its observations can race live workers and require provider-side reconciliation before an uncertain operation can be resolved.

The checkpoint and `epochAnchor` are alternative revocation protections and cannot be configured together. Protocol 3 detects selective changes to committed local decision files and mode before issue or dispatch if its separately retained state stays current. The epoch-aware claim checks the independently held issuer epoch at dispatch. The checkpoint can be combined with spent-only `claimOnce`.

This reference is deliberately unavailable after a crashed lock. **Do not automatically remove the lock, replace the authority directory, or issue a replacement grant**: first reconcile the claimed operation against provider records, any external state, and the persisted outcome, then follow an operator-controlled recovery procedure appropriate to the host. The pinned directory identity detects replacement only during the lifetime of that instance. The spent-only `claimOnce` hook protects a spent grant or host operation while its independently held claims remain durable and the host retains its operation ID. The epoch-aware claim additionally rejects an old unspent grant after local epoch rollback; the checkpoint detects a restored older authority directory while its external state stays current. No option protects a replaced or rolled-back external store or makes the local store tamper resistant. The module does not supply a production external store, an operator recovery procedure, authenticated approvals, policy evaluation, distributed consensus, network filesystem locking, store tamper resistance against another process with the same OS identity, or protection for tools that bypass the gate. If revocation attempts find the lock busy, the host must retain the pending revocation and retry it; a busy response does not mean revocation took effect. Provider-side revocation-at-handoff and a production multi-machine claim remain unproven.
Expand Down
Loading
Loading