Skip to content

feat: charter-refusal — the keystone, recorded into the scar#2

Merged
hartsock merged 2 commits into
mainfrom
feat/charter-refusal
Jun 14, 2026
Merged

feat: charter-refusal — the keystone, recorded into the scar#2
hartsock merged 2 commits into
mainfrom
feat/charter-refusal

Conversation

@hartsock

Copy link
Copy Markdown
Member

Summary

The Refusal invariant in code — and it depends on charter-scar on purpose: the dependency edge is the interlock the doctrine describes (a refusal is recorded into the memory).

  • Decision::resolve(log, choose) takes a chooser that may always return Choice::Refuse; Verdict always admits Refused. You cannot construct a decision whose only outcome is proceed — that's "the possibility of dissent may not be eliminated," structurally.
  • A refusal records a ScarKind::Refusal (reason + declined action) and returns Verdict::Refused { reason, scar }; proceeding records nothing.
  • Decision.authorized carries the can (within the writ); the chooser governs the should. Refusing an authorized action is the can/should wedge against the Demiurge / Confused Deputy — and it's recorded. The dual of the Writ.
  • refusals(&log) makes dissent first-class and queryable (the audit question "how could this have been declined?").

The keystone doctest is the whole thesis: an injected request the agent can satisfy is declined as not warranted, and the refusal lands in the memory as an open wound until metabolized.

Verification

16 tests across the workspace (8 scar + 6 refusal + 2 doctests) · clippy -D warnings clean · fmt clean · pre-push hook passed.

Stack

Stacked on #1 (base feat/charter-scar); re-targets to main as the stack lands.

risk: low (new crate, additive).

hartsock and others added 2 commits June 14, 2026 18:05
The first invariant realized in code, and the one that was the original worry
made into a mechanism: how an agent accumulates *metabolized failure* across time
— wisdom it can persist.

`ScarLog` is append-only and hash-chained:
- record() is the only mutation — no edit, no delete (no Demiurgic forgetting).
- a wound (Mistake/Refusal) with no lesson is an *open wound*; heal() closes it
  by APPENDING a Healing that names it — the wound is never mutated.
- each entry is content-addressed (b3-…) and links to its parent; verify_chain()
  recomputes the ids and the links, so tampering is detectable (interlock with
  the `provenance` invariant).
- Refusal is Scar-worthy: a declined action is recorded as ScarKind::Refusal
  (the keystone writes into the memory).

Turns steward-charter into a Cargo workspace (doctrine + reference crates) and
adds the governance the line requires now that there's code: .githooks/pre-push
(fmt --check + clippy -D warnings + test) mirrored by .github/workflows/ci.yml
and a justfile, cross-referenced for parity.

9 tests green (8 unit + 1 doctest), clippy -D warnings clean, fmt clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Refusal invariant in code, depending on charter-scar on purpose: the
dependency edge IS the interlock the doctrine describes — a refusal is recorded
into the memory.

- Decision::resolve(log, choose) takes a chooser that may ALWAYS return
  Choice::Refuse; the Verdict type always admits Refused. You cannot construct a
  decision whose only outcome is proceed — that is "the possibility of dissent
  may not be eliminated," structurally.
- A refusal records a ScarKind::Refusal into the log (reason + declined action)
  and comes back as Verdict::Refused { reason, scar }; proceeding records nothing.
- Decision.authorized carries the "can" (within the writ); the chooser governs
  the "should". Refusing an authorized action is the can/should wedge against the
  Demiurge / Confused Deputy — and it is recorded. The dual of the Writ.
- refusals(&log) makes dissent first-class and queryable (the audit question).

16 tests across the workspace (8 scar + 6 refusal + 2 doctests), clippy -D
warnings clean, fmt clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hartsock hartsock changed the base branch from feat/charter-scar to main June 14, 2026 22:17
@hartsock hartsock merged commit cb45760 into main Jun 14, 2026
@hartsock hartsock deleted the feat/charter-refusal branch June 14, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant