Skip to content

alpha.55: pre-beta core layers (memory, recovery, model roles, agents, signers, headless Brain, quota-ask) - #113

Merged
AlbSar merged 205 commits into
mainfrom
alpha55/prebeta-track2
Oct 24, 2026
Merged

AlbSar merged 205 commits into
mainfrom
alpha55/prebeta-track2

Conversation

@AlbSar

@AlbSar AlbSar commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Summary

alpha.55 brings the pre-beta core layers that the owner asked for on 2026-10-23: memory automation, lost-worker recovery, the Nervous broker, Auditor audit rows, model roles and model independence, agent and skill emergence, signer keys, the headless subscription Brain, and quota-ask. Every new setting starts off. Turning one on is a person's step, and no AI can do it.

  • Memory: accepted work becomes candidate entries, and workers report lessons. An evaluator from a different model maker runs in shadow mode first. A person reviews entries, resolves contests and purges entries; a purge is replayed after a restore. Verified entries are added to the worker and Brain context. A rollout gate turns this on only when measured criteria are met.
  • Recovery: Nervous fences a lost worker, stops its orphan, releases the slot and holds the run. It then calls continueLostTask, and a model chooses the next step. Each task gets at most three attempts in total. A new attempt never starts while an effect is unknown. Live mode needs the owner's standing grant.
  • Model independence: a role and tier registry with a typed roles card. WorkClass v5 can name models through selectors, and API connect terms come from catalog data. A guard rejects model names written into the code. A new model needs only a data update.
  • Agents: the system selects the agent. Each agent has a standing and a recorded failure cause, and its stats are aggregated. The system makes suggestions, and the person decides on cards or a signed, granted AI does. No principal can approve its own suggestion or revision. Narrowing applies only to calibrated rules. Signer keys: only a person adds or revokes them, they stay in host custody, and the revocation log is HMAC-chained.
  • Headless Brain: runs claude -p on the person's subscription inside a bwrap realm with an egress gateway and resource limits. It uses its own Deckent-owned login directory (deckent models login). AI, MCP and system principals need the person's consent first. There is no fallback to the API.
  • Quota-ask: a quota wait lasts at most 5 hours, then the person is asked. A run is never cancelled for quota. The Brain can make a short wait visibly.

Evidence

  • Full suite, run once on 98fa69bb6: 1244 files, 11404 passed, 6 failed, 9 skipped. The 6 failures had 3 causes, all fixed in fs1.
  • Exact head checks are below; typecheck, lint-arch and lint-docs passed at both heads.
Head Test files Passed / total Skipped
49bb1366d 14 180 / 181 1
5468150bb 6 40 / 40 0
  • Real CLI: HEADLESS-0 passed with 4 probes. The isolated acceptance passed (preflight 638 ms, one guarded turn 1433 ms).
  • Security scan (claude-security changes scan, medium effort): 0 findings. Status: verified.
  • Migration proof on real alpha.54 ledgers (copies of the live and n1 ledgers), v59 → v70: row counts equal, integrity ok, second open is a no-op, and alpha.54 refuses the v70 ledger. Every listed record family was read with Node 24 and Node 26. Not covered: keyed audit MAC verification, and independent re-measurement (the raw outputs were deleted with the private copies).
  • Astra: REVISE 2742, R1 (P2) fixed in r1. PASS 2744 on this exact SHA.

Risk

  • One-way door: the ledger moves from v59 to v70. Rollback means restoring the pre-switch backup. Before any rollback, unset the new config keys.
  • Blast radius: new layers that are off until a person turns them on. Runtime protocol is unchanged at 29.
  • Follow-up after landing: reconcile the PLAN line about R1 and the migration, run the docs accuracy audit (Codex + Cursor, read-only), and run a full codebase security scan.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob

AlbSar and others added 30 commits October 23, 2026 04:40
…el, container duration, evidence kinds, score, human decision and quota-park rows) and ledger v60 current-row invariant (ATAMA-0)

One current row per (Task, Attempt, outcome kind) via superseded_by; producer key gains the outcome kind; v1 rows kept byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fety holds, every resume a decision (S5b)

Auditor owner decision 6 (2026-10-17) and PROGRAM law-audit fold 5: a separate hold source
(Nervous pause, Auditor park) that only a person at an interactive terminal lifts, with the
negative proof; the public operator hold no longer resumes without a decision.

- domain: Run hold carries an optional source (`nervous` | `auditor`) on both hold shapes;
  the operator source is never written, so earlier releases read every operator hold.
  One reader/writer (hold.ts) keeps the source through quota release, answer, environment
  park and park resolution. A safety hold may replace an operator hold; never the reverse.
- Y4 floor: `run-hold` resume of any non-operator source is AI_NON_DELEGABLE (ai-floor.ts).
- ledger (proposeRunLifecycleWrite): every resume is a decision; a safety-hold resume needs
  a human-tty decision from a non-AI actor (RUN_HOLD_PERSON_REQUIRED), whatever the write says.
- broker: hold stays the ordinary control; resume needs a witness or the explicit
  run-decision resume cell (MCP1); safety holds accept only the witness. Pre-release
  operator-control resume receipts still replay.
- engine: RunLifecycleApplication.holdFrom(source, ...) trusted ingress (cancel policy, CAS,
  receipt, atomic audit with deciderClass system + holdSource); no surface carries a source.
- audit run-lifecycle subject: optional holdSource (only safety holds and their resume).
- error RUN_HOLD_PERSON_REQUIRED in EN/TR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…esume of safety holds, every resume a decision

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
… and A8 proposal admission; plain verdicts name the retained-output evidence; cost view reads v2 rows

Seed atama-0-2026-10-23 (schema v2): every class carries a completion/retained-artifact profile and a declared proposal risk (small low, test/feature normal,
design/architecture/security-critical high); standing admission stays off until the A8 N1 class-consistency measurement. Effort targets unchanged.
A plain evaluator pass names evidence type retained-artifact so the profile keeps today's conclusions. Work cost: human-decision count and model
evidence label from the v2 row (verified / substituted -> unknown / otherwise requested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…memory journal (needs owner approval via the lead at alpha.55 fan-in)

The base sat at the composition ceiling; the memory journal's configured entry points (one 23-line unit plus one-line host and MCP
hooks) need 30 lines. Package ceilings are owner decisions (003c530, 633a427): the lead folds this into the alpha.55 budget ask
or drops this commit and the lane shrinks elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…rt, FTS5 search, read-only CLI/MCP inspect (alpha.55 S4, lane ledger v60)

- Domain (pure): entry v1 (fact | lesson with source/cause/correction/evidence), immutable content, candidate -> verified -> retired,
  no delete. Verified needs a human review (never an AI principal) or an independent evaluation record that passed, judges this exact
  content digest and is not by the author; no record resolved = fail closed. The AI may withdraw a candidate, never retire verified
  knowledge. One folding rule (NFKD, marks removed, lower case, Turkish dotless i) and bounded query words for every adapter;
  limits in limits.json.
- Engine: MemoryJournalApplication is the sole transition owner (propose/verify/retire with command receipts, expected-revision CAS,
  one audit event per transition). DB-neutral MemoryJournalStore port (domain JSON only); full-text search is a declared capability,
  a store without it gets a bounded scan fallback that says so. Any read failure after authorization (open, integrity, dangling index)
  is a typed `held` result, never an empty memory; policy denial stays a refusal. Policy resource `memory` (inspect/propose/verify/retire).
- Adapter: SQLite store on the shared ledger, sealed rows (installation integrity key), append-only revisions/receipts, entries
  undeletable, FTS5 index of the folded text keyed by entry rowid, scope filtered in SQL and re-checked above the port.
  Ledger v60 (lane number; lead renumbers at landing): additive tables only.
- Surfaces: `deckent memory [search <words> | inspect <id>]` read-only (held -> stderr + exit 1), MCP list_memory / search_memory /
  inspect_memory (read-only) and an MCP capability group `memory` (inspect). New i18n + error family `memory` (EN/TR).
- No surface writes, no agent memory tool, no legacy import (K-D import is a later card); no first-run policy template change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…shows (unique prefix over the scope; CLI_ID_UNKNOWN/AMBIGUOUS otherwise)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
… row and a Run-incomplete row (distinct outcome kinds)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd per-scope seq, stable across VACUUM / VACUUM INTO backups (lane v60 schema)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…t fit the seed profile (typed admission refusal)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sition 8200 (core layers; owner 2026-10-23, re-measured at fan-in)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…eptance profiles, proposal admission off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
… the S4 memory journal (needs owner approval via the lead at alpha.55 fan-in)"

This reverts commit 913f138.
…v61 after S0's metrics v2 (v60)

CURRENT_LEDGER_VERSION 61, MEMORY_JOURNAL_LEDGER_VERSION 61; S0's v60 migration unchanged. Downgrade fixtures chain v61 -> v60 (memory
tables dropped) -> v59 (S0's metrics table) -> ...; current-version pins 60 -> 61; S0's metrics test asserts the current version after
its full migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…retire` on the person's own terminal card (lead 2026-10-23)

- propose --input <file>: the fact or lesson JSON is shown on one card and saved as a human candidate (origin human).
- verify <id> --note <text> / retire <id> --reason <text> [--superseded-by <id>]: the card shows the entry (who proposed it, AI or person,
  its revisions); the writer gets the exact revision the card showed. Short ids resolve as for inspect.
- AI tools, pipes and --json are refused with AUTHORITY_WITNESS_REQUIRED before anything is read (like `coding instructions trust`);
  the composition checks the terminal witness again for verify and retire (the MCP actor never), so the composition API keeps only
  AI proposals. A cancelled card writes nothing (exit 1). EN/TR texts; help goldens regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…w read port, read-only auditor principal

D1 (owner Q5 2026-10-17, q5 changed in this scope): every refused (deny / require-approval)
agent tool call decision — at the policy question, on the planned cell, at the effect and after an
owner approval — and every plain allow that ran is sealed in ONE `policy-turn` audit record per turn
(tool identity, position, cell, argument digest, revision; bounded lists with full counts, `ceiling`
past the refusal bound). Written when the turn ends; never changes a decision or fails the turn.
Silent counters stay. Every evaluatePolicy call site is mapped (tests/fixtures/audit/policy-decision-sites.json)
and a guard test fails on an unmapped site.

D2: AuditFollow v1 (domain query/page schemas, engine port): verified events after a sequence,
typed gaps for missing records, forged/foreign records stop the read, no key material to the reader.
No runtime operation yet (needs the protocol bump after K1-K8).

Auditor principal (owner Q4): `<issuer>/auditor` workload identity built in code (no client channel
names it); the AI floor refuses every action outside inspect/list/verify whatever a policy grants;
the audit writer refuses events attributed to it.

Additive audit subject only: no ledger or protocol version change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…n record

A refused write-set entry of a full-auto or owner-approved shell call is an effect-stage
refusal of the turn's policy-turn record (zero net composition lines); direct tests for the
write-set and the post-approval policy deny; call-site map note updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…Follow read, read-only auditor principal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob

# Conflicts:
#	src/domain/core/audit/index.ts
…erson and the MCP actor (add-only, rollback delta; S4, lead 2026-10-23)

- v14 rules: first-run-memory-inspect (named person) and first-run-mcp-observe-memory (MCP actor), `memory`/`inspect` in the installed
  scope(s); no memory change granted to anyone. Fresh template, exact v4–v13 replacement, both add-only plans (first-run and named
  person) and the rollback (`FIRST_RUN_CURRENT_UPGRADE_RULE_IDS` is now the v14 delta; rollback recognises installer keys v14+).
- An add-only plan above POLICY_CHANGE_MAX (a v4-era policy now needs 34 rules) takes the first 32 and names `remaining`; the same
  upgrade run again adds the rest (each run idempotent) instead of failing the policy-change schema.
- Tests: new first-run-v14; v11/v12/v13 and installer/governed/rollback/PTY tests derive older templates by removing both later deltas;
  rollback fixtures retargeted to the v14 delta; the /policy PTY walks nine capability groups (S4 `memory`). AI-floor report regenerated
  (memory vocabulary rows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…t fold 6, lead 2026-10-23)

Verified memory needs a person or an independent evaluation record, never the AI itself: a policy rule naming an AI or the MCP actor for
memory/verify or memory/retire is denied with AI_NON_DELEGABLE (propose and reads stay policy decisions). Negative test in first-run-v14;
the AI-floor inventory gains the 'memory' family and the report is regenerated (floor=188, 0 violations).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ire (S4 floor)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
… propose/verify/retire, AI hard floor, template v14 memory/inspect)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob

# Conflicts:
#	docs/reports/ai-floor-compliance.json
#	docs/reports/ai-floor-compliance.md
#	src/domain/core/audit/internal/contract.ts
…the AI floor refuses (s4 × s5 fan-in)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…sure for lost-worker recovery

S6R design §15 text recorded verbatim in owner-decisions (anchor s6r-kayip-calisan-2026-10-23) with
source and owner answers Q-R1..Q-R5; ARCHITECTURE lines 85/705 and PLAN MARK-LOST-ATOMIC line updated in
place (no net lines); the replaced lines are kept verbatim in the decision section (doc preservation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…, first running incarnation, launcher capture, effect producer)

- Docker supervisor reports the created container id (64-hex, after the mount check, before start) through new optional launch hooks;
  DispatchApplication makes it durable (`containerId` on the dispatch record) before the worker starts; a refusal starts nothing.
- The incarnation must be that container; the heartbeat sample retains it at the first running observation (dispatchNeedsObservation ->
  existing reconcile writer). Dispatch journal retention unified (launch evidence, artifacts) to stay within the unit budget.
- DispatchPreparationGuard keeps the launcher record (instance, phase, counts) or `unreadable` as launcher evidence before a claimed
  settle clears it; a failed capture clears nothing; first capture never replaced.
- Effect intents carry a mandatory `producer` (Attempt identity | principal): EffectApplication requires it from composition (all current
  producers are direct principal commands), the store refuses a new intent without it, older intents stay readable and resumable, a
  recorded intent resumes only under its producer. Descriptor gains optional `idempotencyScope` ('task' | 'command', no default).
- Producer index migration written but NOT wired: ledger number assigned by the lead after s1 lands.
- Negative tests first (red on base): missing producer, foreign producer resume, container id before grant / on a fenced dispatch /
  different id, incarnation of another container, hook refusal starts nothing, launcher capture failure; Docker-gated real check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ions (container id at create, incarnation, launcher capture, mandatory effect producer)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…key (FTS5 shadow tables of ledger v61)

The run-refusal snapshot ordered every table by rowid; the S4 memory search FTS5 shadow tables are WITHOUT ROWID, so every
admission-refusal test that snapshots the ledger failed with "no such column: rowid" on a55/integrate (pre-existing, c60a78b).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…in v3 plans tasks + WorkClass only, admission seals channel/model/effort (lane ledger v62)

Owner ASS1, A1, A5 (+K10): the Brain no longer chooses the worker.
- Domain: WorkClass registry v4 = v3 + ordered candidate lists (`candidatePolicies`: channel, exact model, optional effort deviation; bounds in
  work-class-limits.json) referenced by `candidatePolicyId`. An overlay replaces a Core list only by compare-and-set on its version; a class naming an
  undeclared list is refused. Core seed revision atama-1-2026-10-23 (light/standard/deep lists over Claude, Codex, Cursor exact ids).
  Work input v2: `model` optional (absent = system assigns); effort without model refused; v1 unchanged. Assignment seal schema (workClass +
  revision, list id/version, candidate index, every skipped candidate with its typed reason, catalog/model/activation revisions, effort level/source).
  selectWorkerEffort `assigned` target = candidate deviation ?? catalog vendor default ?? CLI default (A1); the pinned path keeps the class default.
- Engine: assignTaskWorker tries each candidate through the same admitWorkerModels check a pin gets (catalog, lifecycle, alias, scope activation,
  channel/CLI match via the compiled template, CLI floor); first admissible wins, none = WORKER_ASSIGNMENT_NONE naming all skips; no list =
  WORKER_ASSIGNMENT_NO_CANDIDATES; never another model. Run admission seals the choice per task (execution snapshot `assignment`), the Run
  integrity check binds seal ↔ frozen pin; replay is byte-identical. Approval card shows worker, effort and list position (+ skipped).
  Metrics v2 rows carry the assignment summary (optional field). Proposal spending classification assigns the same way (catalog reader port).
- Brain template v3 (selected; v1/v2 rows unchanged): offered schema is work input v2 without model/effort, no worker models in the context, no
  candidate lists in the WorkClass projection; a new reply naming a model/effort/v1 input is BRAIN_ASSIGNMENT_REFUSED before any proposal.
  Stored proposals keep their source check (no re-judging).
- Adapter: compiler refuses a model-less input (WORKER_MODEL_UNASSIGNED). Ledger v62 = version step only (lane number; lead renumbers).
- i18n/error family `assignment` (EN/TR). Goldens: config defaults (template v3), MCP propose/create_run inputSchema (work input anyOf v1|v2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ment summary; a pinned row carries none (ATAMA-1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ws the task, WorkClass and each skipped candidate; a changed assignment parks the pending card

The /do path recorded WORKER_ASSIGNMENT_NONE with the code only, so the card printed the bare refusal. The proposal result now carries the
task, WorkClass and skipped candidates as response-only reason params (the budget-detail pattern); the plain text has no placeholders, so a
replay renders cleanly. Base messages are param-free, `.detail` variants carry the parameters (EN/TR). Tests: proposal-path refusal detail on
the response and card (EN/TR) and its replay; a pending proposal whose assigned model is deactivated is parked RUN_PROPOSAL_BASIS_STALE, never
re-assigned to the next listed model. arch.json: run-proposal declares its model-activation dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
AlbSar and others added 26 commits October 24, 2026 01:00
…cord, inspect and doctor (f5 item 3)

The isolated CLI's gateway counted refusals but nobody saw them. It now keeps
them by host name (DNS grammar only, up to providers.json refusedHostsMax
distinct names; malformed targets, non-CONNECT requests and overflow count as
other). Every headless call carries the summary: the responded native
response's headless block and every rejected adapter body (optional egress,
schemaVersion 1 unchanged). Each spawn with refusals adds to a 0600
egress.json beside preflight.json; the doctor Brain-login line names the
count and the most refused hosts (doctor.json bound), and
models invocation inspect renders the line from retained content.
Counts and host names only, never a target port, path or payload.
arch.json: native-connection declares its domain model-invocation edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the aggregator (I2 rollback); template, vocabulary, rollback and installer tests carry the S8-5/S8-3 v15 rules; MCP read-only list names the signed writes; AI-floor report regenerated after the merge

Also closes pre-existing integrate failures in the same tests (s85's signer/import rules were missing from template-upgrade-rollback,
first-run-template, installer-authority-audit and policy-vocabulary pins); the text-change fixture keeps a55/integrate's entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
… suggestion (cooldown, N35); the monitor's catalog lines are recalled per scope like the other ledger reads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ng; ledger v70)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…typed when hit (f5 item 1)

No-MVP follow-up of S3-5. Inside the realm the registry's limiter (util-linux
prlimit, absolute path) sets per-process CPU time (soft 60 s SIGXCPU, hard +5 s
SIGKILL) and data size (2 GiB, brk and mmap since Linux 4.7) and the realm's
task bound (64; RLIMIT_NPROC counts the realm's own user namespace, measured
on kernel 6.18) before the relay starts. The relay first proves those bounds
are its own (/proc/self/limits), samples the realm's tasks and the CLI's data
size, CPU and effective bounds every 50 ms, and when the CLI ends abnormally
near a bound exits with that bound's reserved code (a CLI's own exit with a
reserved code becomes 1). The port turns it into a rejected receipt
(refusal resource-limit, field cpu-time|processes|memory), preflight into
HEADLESS_LIMIT_REACHED, the Brain planner maps it the same way. A missing
limiter or one that does not apply the bounds closes the channel typed
(HEADLESS_ISOLATION_UNAVAILABLE check limits); no unbounded fallback.
EN/TR texts in headless.json. All values and the measured sources are
registry data; flagSetDigest changes, so existing preflight records re-run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4 marked released

Version 1.0.0-alpha.55 in package.json, package-lock.json (2) and package-metadata.json. CHANGELOG: alpha.54 released
(2026-10-23, c87db94, PR #112, live 11:41Z, N1 11:42Z, switch c87db94-b4761c14cfaa, ledger v59); alpha.55 Unreleased
line keyed by card ids (S0-S9, S3-1..5, S4B-1..7, S6R-1..6, S8-1a/1b/2/5, M2-M5, F1-F4) with TODO anchors for s834/f5.
New module note .deckent/docs/architecture/modules/core-layers.md (switches, bounds, ledger v60-v69, file:line refs);
ARCHITECTURE core-layers section, M5 intro and K-B Nervous line updated; owner-decisions: S3 Q-H1..Q-H5 + HEADLESS-0, S8
rounds 1+2, Deckent Hub = alpha.56, no-MVP rule, package ceilings, general model independence. PLAN: alpha.54 released,
alpha.55 done list, alpha.56 Hub row, S10/S11 blocked on owner detail; COMPLETED-PLAN alpha.54 entry. known-limits EN/TR:
core layers section, subscription Brain, quota ask, lost-worker recovery state, switch/rollback notes for alpha.55.
operator-reference EN/TR: core-layer commands. README/README.tr/SECURITY name alpha.55. Replaced PLAN/ARCHITECTURE lines
kept verbatim in the plan archive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ledger v70); architecture overview names the core layers

TODO(s834) anchors filled from code: catalog suggestions (ledger v70), person cards promote/demote/restore/retire, dismiss,
standing reset, define --from-suggestion (draft rendered at card time through the person's read filter), signed MCP writes
define_agent/define_skill/import_skill/change_agent_standing/dismiss_agent_suggestion, self-approval guard (standing.ts:71),
narrowing only for a calibrated rule in mode on (pass.ts:110), revoke one-step demote and monitor lines. Updated: CHANGELOG,
core-layers module note, ARCHITECTURE core-layers section and module row, known-limits EN/TR (agents item, ledger v70),
operator-reference EN/TR, PLAN (alpha.55 row, remaining work: F5 only); replaced PLAN lines kept in the plan archive.
docs/architecture-overview EN/TR: one paragraph on the alpha.55 core layers. TODO(f5) anchors remain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…tem 1 follow-up)

The relay attributed processes/memory on any abnormal exit near a bound, and
Bun sizes its data reservations to RLIMIT_DATA, so a SIGINT-ended turn could
come back typed as memory. The relay now records the group SIGINT it already
receives and never names a bound after it, nor for a SIGINT/SIGTERM death.
Negative: a self-interrupted fake near its lowered data bound stays an unknown
outcome (resolved as resource-limit before this fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… per login dir (f5 item 5)

Measured (names only, no model call): no refresh-lock name exists in the login
dir at rest and none appeared during in-realm --version, --help and auth
status; a refresh cannot be triggered without a model call. The realm binds
the login dir itself, so the CLI's lock file is the same inode for the realm
and the person's own sessions, but whether the CLI's stale-lock check uses a
process id is unverified, and the realm's PID namespace would break such a
check both ways. Smallest safe serialization: every headless spawn takes a
0600 Deckent lock per login dir (sha256 of its realpath) in the global
headless root beside the state dirs (stale when its process is gone or it is
older than staleMs), and never starts while a registry refresh-lock name
exists in the login dir (lstat on the name only). Past the registry wait it
refuses typed: HEADLESS_LOGIN_BUSY holder cli|deckent (EN/TR). The lock
names must be part of configVisible (registry refine).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… anchors

Resolution: cli-text-changes.json keeps integrate's agentstats entries and
drops the unreleased TR config.field.models entry (f5 item 2 restored the
alpha.54 text). Anchors filled with verified f5 facts: CHANGELOG alpha.55
line, core-layers.md headless section, known-limits EN/TR (realm CPU, memory
and process bounds, gateway refusal counts, refresh-lock finding, retired
models.headless.preview). The domain additions of item 3 are compacted so
src/domain stays within its 10000-line budget after the merge (now 10000).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erialization, preview retired, /help pin)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ource (CS-1; s82 gap)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…the composed config object, stamp the memo generation (MON-CPU-FIX regression, fs1)

The f2 pending-role diagnostic (0a8142b) reads model roles through the config-file adapter, whose snapshot does a forced loadConfig; a forced
cacheable load replaces the cached composed config object under the same key, so the generation's object identity changed on every read and the
live monitor recomputed all reads each heartbeat (measured idle read: 11 recomputes, ~102 ms; now 0, ~34 ms). The generation now carries the
stat stamps of both config layer files (the paths the loader stamps) beside the ledger/policy/bindings stamps, and the role read is recalled per
scope like the S8-4 catalog lines. MonitorSourceMemo.identity is gone with its only caller. Brain quota waits stay a live read (they end on the clock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…equires` (CLI-INSAN S2 syntax rule, fs1)

S8-4/S8-5 (325af3c, 9099f28) declared `<key-id>`, `<agent-id>` (4), `<suggestion-id>` and the literal word `reset` in action `requires`,
after the S2 rule (02115d9) fixed positionals to `<word>` — the form the refusal's placeholder localization (`cli.help.placeholder.<word>`)
reads. They now declare `<id>` like `agents inspect`/`agents skill` and every other family (the localized usage prose keeps its descriptive
`<agent-id>`/`<ajan-id>`, as `agents inspect` already does); `standing` requires only `--work-class <id>`: `reset` is its fixed word, named by
the usage and summary. No message text changed; the help goldens show the new Required lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…below one kind and one evaluator is a typed refusal (fs1)

alpha.55's new policy resources (memory, agent-catalog, skill-signer, recovery-action; vocabulary.ts) grew the context's fixed part
(permissions ~2 KB, workClasses ~1.1 KB). At maxBytes 4000 the kinds list (4 rows) and the single evaluator then tied for "largest list", the
stable sort popped the evaluator and the Brain got a context with no evaluator it could cite (brain-context.test.ts:23). Memory still leaves
first (S4B-6); the largest list still loses its last row, but no offered list is emptied: a bound that cannot hold one row of each is
BRAIN_CONTEXT_TOO_LARGE before any model call. New negative test at 3500 bytes; both tests fail on the old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned Claude login dir (s3c, owner 2026-10-24)

Owner 2026-10-24 (Jev 1d5e4879 deckent_owned_dir 0.92): the headless subscription
Brain no longer uses the person's ~/.claude by default.
- layout resource headlessLogins = headless/logins under the global state root;
  the CLI's dir is <resource>/<registry CLI id> (0700, private-dir checked, names
  and metadata only; never in BACKUP_RESOURCES).
- registry data headless.login: argv `auth login --claudeai`, --sso switch,
  timeoutMs below refreshLock.staleMs, built env (inherited allowlist + fixed +
  CLAUDE_CONFIG_DIR; schema refuses deny names). connect.configDirDefault retired.
- `deckent models login --connection claude-cli-subscription [--sso]
  [--config-dir] [--executable]`: person's terminal act (surface interactive gate
  + composition terminal witness; MCP/AI/CI/pipe/--json refused before anything is
  created), card shows the exact dir, the CLI's own sign-in runs with inherited
  stdio (spawnSync, outside the realm: browser OAuth) under the login dir's lock;
  then `auth status` inside the realm (allowlisted kind/plan only). A login record
  beside the lock keys the preflight cache, so a re-login (account switch) re-runs it.
- connect defaults to the owned dir; --config-dir stays the person's override;
  result cli.owned; doctor names own vs other dir and suggests the move.
- EN/TR texts (headless family, cliadmin paths label), text-change records, help
  goldens, arch unit deps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…keeps one row per list, single-word positionals)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…s own login dir, not ~/.claude (s3c)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Help goldens regenerated over fs1's single-word positionals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…le on every path, re-checked in the write transaction (REVISE 2742 R1)

AgentCatalogApplication.decide (define from a file or a draft) checked only the raw open/mode/expiry/kind/target and never the producer key, so
after a revoke `agents define --input FILE --suggestion ID` still wrote the revision and decided the suggestion the views read as superseded.
One shared check, requireCatalogSuggestionDecidable (live, open, unexpired, producer key active), now serves decide, the standing/dismiss
decidable and the views' revoked mark; the store's moveSuggestion runs it again on the stored row and the signer row inside BEGIN IMMEDIATE for
every decision or dismissal (not the aggregator's supersede), so a revoke between the check and the commit refuses too. Committed rows and
promotions stay (owner Q-S13); a person's define without a suggestion is unaffected. No schema, ledger, protocol or error-code change.

Docs (Astra 2741 reconciliation): PLAN alpha.55 rows no longer carry the stale afb7373/F5 state; PLAN, ARCHITECTURE and README no longer say
every core layer defaults off — the switched layers start off, the headless connect kind has no preview switch (S3-5) and is gated by the
person's login, connect and consent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…very switch starts off, not every layer (Astra 2741 reconciliation)

The headless Brain has no switch since S3-5 retired its preview key: its connect kind is offered once the realm exists and is used only after
the person's own login, connect and consent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
… suggestion before the card; s3c login dir and R1 in docs

- `agents define --input FILE --suggestion ID` refuses a superseded (revoked producer key), expired, decided or shadow suggestion before
  the card is shown, through the same shared refusal the application and the store use (`catalogSuggestionViewRefusal`); the commit
  checks again. CLI test red on base (card shown, define sent).
- core-layers and known-limits EN/TR: the subscription Brain signs in to its own Deckent-owned login dir (`headless/logins/claude`,
  `deckent models login`); `--config-dir` is the person's override; `~/.claude` is not the default (s3c).
- CHANGELOG alpha.55: the REVIEW 2741 R1 suggestion-validity line, the s3c Brain login line, "every switch starts off".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
…ducer key, re-checked in the write transaction; doc reconciliation)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

…itest files move to other shards

Shard 1 also runs test:native, test:host and smoke after Vitest (scripts/ci-shard.mjs). The duration partition
ignored that ~66 s, so on PR #113 shard 1 ran 6m13s twice and hit the 6-minute job timeout (cancelled), while
other shards took 3-4 minutes. The reserve is config data (scripts/ci-test-config.json shardOneReservedMs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrXPpzy6N7zFwchFM6Adob
@AlbSar
AlbSar merged commit f1aba6e into main Oct 24, 2026
41 checks passed
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