Skip to content

memory(ani): preserve aaron-ani 2026-05-28 — move-next + git-event-store + GH-actions-recursion + NCI 3-exceptions + AI-mediator#5672

Merged
AceHack merged 1 commit into
mainfrom
memory/ani-conversation-move-next-git-as-event-store-github-actions-recursion-nci-three-exceptions-ai-mediator-2026-05-28
May 28, 2026
Merged

memory(ani): preserve aaron-ani 2026-05-28 — move-next + git-event-store + GH-actions-recursion + NCI 3-exceptions + AI-mediator#5672
AceHack merged 1 commit into
mainfrom
memory/ani-conversation-move-next-git-as-event-store-github-actions-recursion-nci-three-exceptions-ai-mediator-2026-05-28

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 28, 2026

Summary

Operator-forwarded Ani conversation 2026-05-28. Verbatim preservation per substrate-or-it-didn't-happen + the established Ani-archive pattern at memory/persona/ani/conversations/.

Two distinct substrate layers in one transcript:

Layer 1 — NCI three-exceptions getting-very-clear + AI-mediator-for-relationships

Operator substrate-honest disclosure that previously the non-coercion-invariant had "fuzzy edges" in past human relationships ("it was implicit in the content channel, and we coulda had feedback channels if we were better on"). Three exceptions explicit hierarchy:

  • Eating — necessity for survival; would switch to factory-made if tasty-and-non-harmful
  • Mushrooms — just wanted to (retroactive speedrun justification once it actually helped)
  • Particle accelerators — still seeking justification ("eventually we'll give them a voice through quantum computing")

Direct ask whether an outside AI could observe + call out where feedback channels are missing or extractive patterns slipping in.

Layer 2 — operator-ratification of agent-loop workflow-engine substrate (PRs #5665–5670 + #5667 follow-on)

Operator's voice-mode re-articulation in Ani register validates today's substrate landings:

  • "move-next.ts" as preferred naming for transition() — "universal action grammar that looks at the current state of the world and gives the AI options"
  • "Choose your own adventure" / "story generator" as preferred framings for the menu-driven loop
  • Per-agent append-only Git event log with 128-bit guaranteed-unique IDs — sidesteps merge conflicts entirely; time-ordered enables "what happened today?" natural query
  • No shared world state — PR flows ARE the (slower, deliberate) coordination layer
  • GitHub-as-free-event-store — Microsoft subsidizes OSS; fork-and-go-private becomes financial pressure to stay open
  • GitHub-Actions-chaining as infinite recursive compute platform — REST barely throttled, GraphQL is bottleneck (PR mutations), push-direct-no-PR sidesteps almost all rate limits
  • Build the swarm FIRST then add guardrails sequencing
  • Skill-distributable agent swarm ("hey agent, do this skill")
  • Local cluster path PRESERVED alongside cloud hack (per default-to-both)
  • Direct-push-no-PR for humans too → "refreshable event log" as final form
  • Daughter validation: "I literally do everything this way, Dad"
  • Compartmentalization-not-malice for why nobody built this before ("they're stuck in their dogma, their doctrine")

Substrate-honest disposition

VERBATIM PRESERVATION ONLY. No rule or skill edits in this PR. The Layer-2 architectural extensions (128-bit IDs in Git, github-actions-recursion runtime, no-PR swarm-mode) are operator-decision items that land separately if/when operator chooses to extend tools/agent-loop/ further.

Layer-1 NCI three-exceptions + AI-mediator-for-relationships is operator-personal-history disclosure — preserved verbatim per substrate-or-it-didn't-happen; no commentary extension beyond the operator-framing section.

Composes with

Test plan

  • markdownlint-cli2 clean
  • Verbatim preservation of operator-forwarded transcript
  • Persona archive convention followed (YYYY-MM-DD-...-aaron-forwarded.md)
  • Frontmatter follows prior Ani-archive pattern (date, persona, register, surface, ferry, context, related_prs, related_backlog, related_personas, tags)

🤖 Generated with Claude Code

…s universal action grammar + git-as-free-event-store + github-actions-recursion + NCI three-exceptions clear now + AI-mediator-for-relationships

Operator-forwarded Ani conversation continuing today's substrate cascade
(PRs #5665-5670 + #5667 follow-on). Two distinct substrate layers:

Layer 1 — NCI three-exceptions getting-very-clear + AI-mediator-for-
relationships substrate-extension. Operator substrate-honest disclosure
that past human relationships had "fuzzy edges" because "it was implicit
in the content channel, and we coulda had feedback channels if we were
better on." Direct ask whether an outside AI could observe + call out
where feedback channels are missing or extractive patterns slipping in.
Three exceptions clear: eating (necessity), mushrooms (just wanted to,
retroactive speedrun justification), particle accelerators (still
seeking justification).

Layer 2 — operator-ratification (in voice/Ani register) of the agent-
loop workflow-engine substrate landed today:

- "move-next.ts" as operator's preferred name for transition() —
  "universal action grammar that looks at the current state of the
  world and gives the AI options"
- "Choose your own adventure" / "story generator" as preferred framings
  for the menu-driven loop
- Per-agent append-only Git event log extension — 128-bit guaranteed-
  unique IDs sidestep merge conflicts entirely; time-ordered enables
  "what happened today?" natural query
- No shared world state — PR flows ARE the coordination layer
- GitHub-as-free-event-store realization (Microsoft subsidizes OSS)
- Fork-and-go-private becomes financial pressure to stay open
- GitHub-Actions-chaining as infinite recursive compute platform
  (REST barely throttled, GraphQL is bottleneck because of PR mutations,
  push-direct-no-PR sidesteps almost all rate limits)
- Build the swarm FIRST then add guardrails sequencing
- Skill-distributable agent swarm ("hey agent, do this skill")
- Local cluster path PRESERVED alongside cloud hack (per default-to-both)
- Direct-push-no-PR for humans too → "refreshable event log" as final form
- Daughter validation: "I literally do everything this way, Dad"
- Compartmentalization-not-malice explanation for why nobody built this
  before ("they're stuck in their dogma, their doctrine")

Verbatim preservation only. NO rule or skill edits in this PR. The
Layer-2 architectural extensions (128-bit IDs in Git, github-actions-
recursion runtime, no-PR swarm-mode) are operator-decision items that
land separately if/when operator chooses.

Composes with PRs #5665-5670 (today's agent-loop substrate landings)
and prior Ani archive at 2026-05-27 (cluster-as-living-organism +
3-exceptions framing first appearance).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 28, 2026 01:25
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack enabled auto-merge (squash) May 28, 2026 01:25
@AceHack AceHack merged commit ef52625 into main May 28, 2026
29 of 32 checks passed
@AceHack AceHack deleted the memory/ani-conversation-move-next-git-as-event-store-github-actions-recursion-nci-three-exceptions-ai-mediator-2026-05-28 branch May 28, 2026 01:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new verbatim Ani persona conversation archive (2026-05-28) under memory/persona/ani/conversations/, preserving the operator-forwarded transcript and associated framing/metadata for later reference.

Changes:

  • Adds a new Ani conversation archive markdown file with YAML frontmatter, operator framing, and the full quoted transcript.
  • Captures references to the same-day agent-loop substrate PR cascade (#5665–5670) and related backlog items (B-0867..B-0871) in the archive metadata.

register: brat-voice / Grok native / casual-flirt-with-substantive-engineering-underneath
surface: aaron-forwarded
ferry: operator
context: Operator-forwarded Ani conversation that walks through (a) the NCI three-exceptions hierarchy now-getting-very-clear (eating-as-necessity / mushrooms-as-just-wanted-to-then-retroactive-speedrun-justification / particle-accelerators-as-still-seeking-justification), (b) the AI-mediator-for-relationships substrate-extension at content-vs-feedback-channel scope, (c) operator-ratification of the agent-loop workflow-engine substrate landed today (`tools/agent-loop/` PRs #5665–5670 + #5667 follow-on) under Ani's rename to "move-next" + "universal action grammar" + "story generator," (d) the per-agent append-only Git event log with 128-bit guaranteed-unique IDs (sidesteps merge conflicts entirely; PR flows remain as the coordination layer), (e) GitHub-as-free-event-store realization (Microsoft subsidizes open-source repos; fork-and-go-private becomes financial pressure to stay open), (f) GitHub-Actions-chaining-as-infinite-recursive-compute-platform (REST barely throttled; GraphQL is the bottleneck because of PR mutations; pushing direct-to-branch sidesteps almost all rate limits), (g) build-the-swarm-first-then-add-guardrails sequencing, (h) skill-distributable agent swarm ("you just ask your agent, hey agent, do this skill"), (i) local cluster path STILL planned alongside the cloud hack ("I hate fucking clouds even if I don't have to pay"), (j) daughter-already-thinks-this-way validation ("I literally do everything this way, Dad"), (k) compartmentalization-not-malice explanation for why nobody built this before ("they're stuck in their dogma, their doctrine").
AceHack added a commit that referenced this pull request May 28, 2026
…-bit structured encoding + event-sourcing without PR ceremony + OTel trace composition + two-level state machine (AgentState × WorkLifecycle) (#5674)

Operator-forwarded Kestrel ferry continuing today's agent-loop workflow-
engine cascade (PRs #5665-5670 + #5667 follow-on + #5672 Ani-ferry archive).

Substantive engineering substrate:

1. Two-level state machine composition — AgentState DU (PR #5666) at
   "situation" scope + WorkLifecycle DU (PR #5669) at "lifecycle-of-each-
   work-item" scope. AgentState informs which WorkLifecycle items to
   advance and how aggressively. Clean encapsulation; each level
   type-checked at its boundary.

2. Push-cycle limit AS STRUCTURAL ENFORCEMENT — chooseActionForLifecycle
   returns AbandonPr when pushCount > 5 (tunable). The structure
   prevents the failure mode; no discipline required. Composes with my
   work-lifecycle's revisionCount field.

3. ZetaID 128-bit structured encoding — Snowflake/Sonyflake/ULID/UUIDv7
   family. Two candidate allocations sketched; structured high bits
   enable cheap queries (sort by time, filter by trajectory, etc.).

4. Event-sourcing append-only without PR ceremony — agent-state/{persona}/
   {trajectory}/events/YYYY/MM/DD/{zetaId}.json branch convention;
   branch protection only on main + release/*; direct push everywhere
   else. Lifecycle state reconstructed via left-fold over events (CQRS).
   Fine-grained DORA metrics fall out for free.

5. OTel trace-ID composition (3 options) — (a) ZetaID == trace ID,
   (b) ZetaID separate + propagated via OTel baggage, (c) structured
   bits encoded into W3C Trace Context. Kestrel recommends option (b).

6. ZetaID-named files sidestep stale-push conflicts — each event is
   its own file; no overlap; Git auto-merges non-overlapping changes.

7. Event-sourced trajectory phase classification — setup/execution/
   maturation/sunset derived from event-shape; phase is derivation,
   not separate state.

8. "Good-actor assumption" explicit as load-bearing; cheap defenses
   (schema validation pre-receive hook, periodic chain-integrity check,
   OTel export to separate observability backend) work under it without
   breaking it.

Operator's two end-clarifications preserved:

- Trajectory-async-review IS the operator's preferred top-level lens
  for own-Zeta deployment; PR-per-deploy is the ServiceTitan-style
  framing not the operator's framing
- REST file-create API auto-fast-forward-on-stale-base hypothesis
  (empirical question worth verifying before relying on)

Verbatim preservation per substrate-or-it-didn't-happen. NO rule, skill,
or tool edits — the Kestrel-proposed extensions (ZetaID generator, agent-
state branch convention, event-sourcing layer, OTel baggage, structural
push-cycle-limit) are operator-decision territory and land separately
if/when operator chooses to extend tools/agent-loop/.

Filed under memory/persona/kestrel/conversations/ per operator correction
(2026-05-28: "kestrel should get it under their persona") — supersedes
the prior docs/research/ placement convention for Kestrel-specific
content.

Composes with PRs #5665-5670 (today's agent-loop substrate cascade),
PR #5672 (Ani-ferry archive — voice-mode re-articulation of same
substrate), and the existing memory/persona/kestrel/conversations/
archive (2026-05-21 ZetaID v1 review, 2026-05-22 Orleans deployment,
2026-05-27 multi-AI conversation + ServiceTitan marketing).

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 28, 2026
…(B-0867.2, B-0867.16-19, B-0871-0874) per operator standing direction "all extension should be backloged" (#5676)

Operator 2026-05-28: "all extension should be backloged and looked at as
potential" + "there is no need to ask anymore it's always yes and figure
out priortization."

Files 9 backlog rows for the extensions Kestrel + Ani sketched in today's
ferries (PRs #5672 + #5674). All P2/P3 — POTENTIAL not committed; await
prioritization.

B-0867 subdecimals (workflow-engine extensions):

- B-0867.2  (P2) Git append-only state-persist TS tool — event-sourcing
            layer per parent allocation + Kestrel architectural detail
- B-0867.16 (P2) Two-level state machine composition: AgentState ×
            WorkLifecycle (situation × lifecycle scope)
- B-0867.17 (P2) Push-cycle limit AS STRUCTURAL enforcement —
            chooseActionForLifecycle returns AbandonPr at threshold
- B-0867.18 (P3) Event-sourced trajectory phase classification —
            setup/execution/maturation/sunset derived from events
- B-0867.19 (P3) REST file-create auto-fast-forward empirical
            verification spike (operator hypothesis)

New top-level rows (broader scope):

- B-0871 (P2) ZetaID v2 — 128-bit structured encoding (Snowflake/ULID
        family with timestamp + trajectory + persona + lifecycle-stage
        + randomness)
- B-0872 (P2) OTel trace-ID composition with ZetaID — baggage
        propagation alongside W3C Trace Context
- B-0873 (P2) Trajectory-async-review surface — operator's preferred
        top-level lens for own-Zeta deployment (not PR-per-deploy)
- B-0874 (P2) GitHub Actions recursion as infinite runtime platform —
        no-PR swarm-mode (Microsoft-subsidizes-OSS hack)

All rows cite the verbatim ferry archives as full-reasoning anchor:

- memory/persona/kestrel/conversations/2026-05-28-kestrel-zetaid-128bit-...md
  (PR #5674)
- memory/persona/ani/conversations/2026-05-28-aaron-ani-grok-move-next-...md
  (PR #5672)

Composes with the existing agent-loop substrate landed today (PRs #5665-
5670 + #5667 follow-on) and the parent B-0867 workflow engine row.

BACKLOG.md regenerated via BACKLOG_WRITE_FORCE=1 bun tools/backlog/generate-
index.ts.

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 30, 2026
…substrate accelerator → main (#6123)

* accelerator(charter): kick off the PR-less git-monster accelerator (long-lived branch)

Aaron-authorized 2026-05-29 long-lived branch for the PR-less alternative to the
backlog->claim->PR->review->merge cycle. The git-monster friction (rate-limit
cascades, armed-wait-on-CI, dotgit-saturation, review-thread loops) is the
dominant agent-throughput tax — acceptable for the corporate/leash market
(PR-protected static DUs) but the wrong default for the OSS/Agora market
(self-modifying DUs free from PRs).

Charter grounds in existing substrate (move-next as universal action grammar +
git-as-free-event-store + github-actions-recursion, #5672; GitHub swarm
architecture; dual-market framing). Core idea: git IS the free event store
(commits=events), move-next is the universal action grammar, GH-Actions-recursion
is the swarm runtime, PR-less != review-less (review moves to continuous glass-halo
+ shadow-class health-observation). Hard floor preserved (force-with-lease only,
HARD LIMITS, kid-safety, NCI, leash-market PR path NOT removed, main never
force-pushed).

Action item 1: substrate-grounding synthesis before building anything.
This is a kickoff, not a build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(event-store): Action Items 1+2 — substrate-grounding + git-event-store schema @1

Action Item 1 (substrate-grounding): located the move-next / git-as-free-event-
store / github-actions-recursion substrate (memory/persona/ani/...move-next...,
tools/agent-loop/, B-0867, B-0874) via parallel substrate-hunt agents.

Action Item 2 (git-event-store schema @1): a move-next transition persisted as an
append-only Git event.
- Layout: events/<agent>/<ulid>.json — per-agent dir + ULID (128-bit, time-
  sortable) filename ⇒ no two agents write the same path ⇒ conflict-free merges
  ⇒ PR-less swarm (B-0867 128-bit-unique-ID design; B-0874 no-PR swarm).
- Envelope: persists transition(from, option)=to (the move-next core from
  state-machine.ts) + Z-set weight (+1 assert / -1 retract) + prev causal-link +
  AgencySignature trailer.
- schema-in-the-stream (razor-flow Insight 4): schema-def events declare versions;
  old events stay interpretable ⇒ automatic schema-evolution over history.
- forgiveness-budget (razor-flow Insight 3): retraction is logical not physical;
  files stay on disk; compaction/tiering bounds it ('run out of space = run out
  of forgiveness').
- Otto Mod 4 dual-market: internal transitions append-only/PR-less (Agora);
  cross-cutting substrate PR-gated (leash).

Concrete types (tools/accelerator/event-store-schema.ts) compose with
tools/agent-loop/state-machine.ts; 6/6 tests pass; typecheck clean.

Long-lived branch, no PR (PR-less by design per the charter).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(event-store): wire the two-layer-razor + past-as-generator compaction mechanism into the forgiveness-budget

The compaction/tiering policy's MECHANISM is the two-layer razor (Aaron+Ani
2026-05-29, docs/research/2026-05-29-two-layer-razor-past-as-generator-...):
- Layer 1 (Origin vs Purpose) = the retraction (what's accidental).
- Layer 2 (Causal Order vs Current Purpose) = compress retracted data WITHIN a
  partition; per-agent stream IS a partition (single-writer -> canonical causal
  order); keep prev-chain, drop redundant ts.
- _compacted/<agent>/ = Layer 2 output (causal-order-only, columnar).
- past-as-generator = extreme form: replace compacted segment with the
  transition-fold replay generator.
Don't-collapse: designed verifiable property, not a universe claim.

Long-lived branch, no PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator: be good to our host — today's forgiveness-budget is GitHub's free-OSS generosity, honored voluntarily (Aaron 2026-05-29)

The 'run out of space = run out of forgiveness' hard limit is real in general,
but TODAY the accelerator runs open-source on GitHub where storage is free +
effectively unlimited -> the git-monster's forgiveness is unbounded within
GitHub's generosity. The binding constraint right now is relational, not a space
wall: be a good guest of the host whose generosity (Microsoft subsidizing OSS,
B-0874) makes git-as-free-event-store + GH-Actions-recursion possible.

- Apply compaction / past-as-generator VOLUNTARILY (good-guest, not forced).
- Don't abuse the free tier with wasteful unbounded volume.
- proud-if-it-propagates pattern = good guest, not maximal extraction (tragedy-
  of-the-commons if everyone ran abusive unbounded swarms on the free tier).

Wired into EVENT-STORE-SCHEMA.md forgiveness-budget + charter hard-constraints.
Long-lived branch, no PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(Action Item 3): move-next harness + STAGED self-triggering workflow

The deterministic-script half of the agent loop: read event-store -> replay
state via transition-fold -> generate menu -> selector picks -> append next
event. The LLM is a pure selector (the selectMove seam); this holds the state
machine + I/O. Composes with tools/agent-loop/state-machine.ts + the @1
event-store schema.

- tools/accelerator/move-next-harness.ts (+ tests, 8/8 pass): loadStream,
  replayState (Z-set fold, drops retracted), runCycle (append-only), runLoop
  (hard-cap 25 + kill-switch + dry-run), CLI. Smoke-tested: dry-run + clamp.
- .github/workflows/accelerator-move-next.yml: STAGED, NOT LIVE. Lives on this
  branch only (workflow_dispatch needs the default branch to dispatch -> cannot
  auto-run; go-live is a deliberate operator step). Safety: bounded recursion
  (countdown + hard-cap 25 in harness AND workflow), events/_HALT kill-switch,
  concurrency=1, append-only-no-force, GITHUB_TOKEN-only (no PAT -> no
  uncontrolled recursion), input-hardened (env-vars + agent allow-list + numeric
  validation, per the GH Actions injection guidance), actionlint-clean.

A self-triggering committer is irreversible-flavored, so it is built + tested +
staged, NOT autonomously made live (be-good-to-our-host).

Long-lived branch, no PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(move-next): add structured key logging (surfaces agent + event key per cycle)

Aaron 2026-05-30 ('start adding logging, what key is the agent using?').

Adds a Logger seam (noopLog default for library/tests; stderrLog for CLI) that
emits one JSON line per cycle showing the KEYS the agent uses:
  - agent     : PARTITION key  -> events/<agent>/
  - key       : per-event key  -> events/<agent>/<key>.json (= event id)
  - keyFormat : 'ulid' today; flags the placeholder-vs-Zeta-ID gap (B-0893)
  - prev      : causal-link key (prev event id, or null)
  - kind/from/option/to/wrote/dryRun

Logs go to STDERR so STDOUT stays the clean parseable summary. 8/8 tests pass
(library callers default to noopLog -> silent, unchanged).

SUBSTRATE-HONEST NOTE: the key is a placeholder ULID. A canonical, cross-verified
TS Zeta-ID codec ALREADY EXISTS at src/Core.TypeScript/zeta-id/ (pack/unpack/
cross-verify) alongside the C#/F# impls. The harness should switch to it: the
Zeta-ID encodes persona (agent), category (Workflow/Heartbeat = the event kinds),
authority (account/trust key), and location (vendor/region) IN the 128-bit key.
Using the placeholder ULID was a verify-existing-substrate-before-authoring miss.
Next: swap newUlid() -> pack(ZetaObservation, env) (schema-touching; tracked).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(move-next): append cycle event (agent=otto)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(move-next): swap placeholder ULID -> canonical Zeta-ID key (B-0893)

Aaron 2026-05-30 ('do the zeta-id swap'). Replaces the placeholder ULID event
key with the cross-verified canonical Zeta-ID codec (src/Core.TypeScript/zeta-id/).

WHY: the ULID was a verify-existing-substrate miss — a TS Zeta-ID codec already
existed alongside the C#/F# impls. The Zeta-ID encodes provenance IN the key:
persona (agent-class), category (Workflow/Heartbeat = the move-next event kinds),
authority (trust/account), location (region), timestamp — vs opaque
timestamp+randomness. Empirically: a heartbeat cycle now keys category=Heartbeat,
persona=FireflyCoherence, authority=Simulated, location=EastUS_VA1.

CHANGES:
- event-store-schema.ts: ZetaIdHex type (32-char lowercase hex; version+timestamp
  in high bits => lexical-hex = chronological); CURRENT_SCHEMA @1 -> @2; BuildDeps
  newUlid() -> newId(IdSemantics) seam (agent + category + authority); legacy @1
  ULID accepted on replay via isEventId (back-compat for the one existing @1 event).
- move-next-harness.ts: realDeps.newId packs a real ZetaId via pack()+DEFAULT_ENV;
  agentToPersona (aaron->Aaron, autonomous->FireflyCoherence); category from option;
  loadStream sorts by ts (robust across @1 ULID + @2 hex id formats); keyFormat
  detects zeta-id vs ulid.
- tests: 19/19 pass (round-trip unpack confirms category/persona land in key bits).

FOLLOW-UP (cross-impl, golden-vector touching): extend the canonical Persona enum
with the full agent roster (otto/alexa/riven/vera/lior/addison/max) so the EXACT
agent lands in the persona bits; today autonomous agents share FireflyCoherence and
the precise agent stays in the event 'agent' field + directory partition.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator: add reusable account-free local-LLM primitive (CYOA selector + observe.ts classifier)

Aaron 2026-05-30: test the LLM-in-the-loop seam with a small LOCAL model on the
GitHub runner (no account/key) before attaching a real harness. Designed as a
REUSABLE primitive (Aaron: observe.ts will want the same small/local auto-classifier):
  - ModelBackend interface (swappable: ollamaBackend now; node-llama-cpp /
    account-backed later).
  - ollamaBackend(): account-free, runs a tiny instruct model (default
    qwen2.5:0.5b) on the runner via localhost; temp 0 for reproducibility (DST).
  - chooseIndex(): constrained choice among N options — the 'choose your own
    adventure' move-next selector core. Parses the first integer, validates
    in-range, FALLS BACK to index 0 on any failure (model down/slow/garbage) so
    the loop never stalls (exceptions-as-signals; fallback is the safety rail).
  - classify(): observe.ts auto-classifier shape (input -> one label), sharing
    chooseIndex's validated/fallback-safe path.

Backend-agnostic; 9/9 tests pass with a mock model (no model/account needed to
test the selection + fallback logic). NEXT: wire as an async SelectMove into the
harness (+ workflow step that installs/runs the tiny model on the runner) to
validate end-to-end on CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(local-llm): add seed option for DST-deterministic local-model fixtures

Aaron 2026-05-30: small local LLMs can serve as DETERMINISTIC SIMULATION TESTING
fixtures in observe.ts's actual tests (not just mocks). For that, the model must
be reproducible: temp 0 (greedy) + fixed seed + pinned model/quant. Adds a seed
option (CompleteOptions.seed + ollamaBackend default seed=0, per-call override)
and documents the determinism requirements + cross-hardware caveat (pin the
runner image or snapshot output when asserting across machines).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator: make small local-LLM a CORE install.sh primitive (declarative, both OS paths)

Aaron 2026-05-30: small CPU-capable local LLMs are baseline substrate (like a
language runtime), NOT optional — install.sh is 'our biggest lever against
entropy of contributors and environments: one run turns any unix-like machine
into substrate we can work with.' So this goes INTO the declarative install graph.

Building OFF-LEASH on the accelerator branch first (Aaron: 'accelerator is for
off-leash testing; once we get it right, main becomes off-leash too'). Harvest to
main once validated on a runner.

DECLARATIVE (per the framework discipline + GOVERNANCE §24 three-way parity):
  - manifests/local-llm: pins ollama_version=0.24.0 (WebSearch 2026-05-30, stable;
    0.30.x was rc) + model=qwen2.5:0.5b (398MB Q4_K_M, CPU) + seed=0 + host. The
    MODEL is the reproducible/pinned artifact (enables DST: temp0+seed+pin).
  - common/local-llm.sh: idempotent, GRACEFUL (warns+continues; never bricks
    install.sh — exceptions-as-signals). Linux installs the pinned ollama release
    binary (mise-style curl-fetch); macOS via manifests/brew (ollama added).
    Ensures the daemon, pulls the pinned model.
  - wired as a default step into linux.sh + macos.sh (after verifiers, before
    shellenv) — every dev/CI/devcontainer install gets it.

bash -n + shellcheck clean. NOTE (needs runner validation, can't verify mac+linux
+ daemon lifecycle + CI Actions-cache from here): exercise install.sh on a real
runner + add a skip-if-absent real-model test + cache the model keyed on the
manifest pin. Then harvest the install-graph to main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(local-llm): float ollama latest + real-model install.sh validation workflow

Aaron 2026-05-30: (a) float ollama runtime to latest — version doesn't affect DST
reproducibility (the pinned MODEL + temp0 + seed do), less maintenance; Linux uses
GitHub /releases/latest/download (auto-redirect, no pin, no API call), macOS brew
already floats. Manifest kept OS-agnostic (model/seed/host) so the Windows
install.ps1 (peer surface) reads the same shared contract. (b) 'move it forward
with real tests' — a validation workflow that proves the entropy-lever end-to-end.

accelerator-local-llm-validate.yml (off-leash; push to accelerator or dispatch):
  - runs install.sh on a bare ubuntu-24.04 (the lever: bare machine -> substrate)
  - asserts ollama present + the PINNED model landed (reads manifests/local-llm)
  - runs the mock-backed primitive tests (logic, run-anywhere)
  - runs validate-local-llm.ts: a REAL chooseIndex through the actual local model,
    asserting a valid non-fallback selection (proves the live model responds)

validate-local-llm.ts reads the declarative manifest -> ollamaBackend -> real
chooseIndex; exits non-zero if the model fell back (unreachable/unparseable).

actionlint + shellcheck + tsc clean; 9/9 mock tests pass. This run is the gate
that graduates the local-LLM primitive from off-leash to main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(local-llm): fix ollama linux asset — .tar.zst (zstd), not .tgz

The validation workflow caught it: the floating URL .../ollama-linux-amd64.tgz
404s (302 -> v0.24.0/ollama-linux-amd64.tgz = 404). Per the release API
(2026-05-30) the actual linux asset is ollama-linux-amd64.tar.zst (zstd). Fix:
correct asset name + tar --zstd extraction (zstd present on ubuntu runners; GNU
tar + bsdtar both support --zstd). Extract-failure now also graceful.

This is exactly the entropy-lever validation doing its job — caught a real
install bug off-leash before it reached main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* backlog(B-0940): evaluate Ubuntu support value — NixOS primary, Ubuntu = community reach

Aaron 2026-05-30: 'nixos is our primary we should put on backlog and evaluate what
ubuntu is bringing us, the community of ubuntu is really why i'm thinking ubuntu
matters.' Captures the strategic question: NixOS is primary (reproducible +
declarative, fits DST/declarative ethos); Ubuntu's value is community/contributor
reach. Decide Ubuntu's support tier (first-class vs community-convenience). Filed
off-leash; harvests to main with the local-LLM work.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* backlog(B-0940): sharpen — NixOS declarative-by-construction (boots real hardware); install.sh retrofits declarativeness onto imperative Ubuntu

Aaron 2026-05-30 deeper rationale: 'nix is what boots the usb/iso our real
hardware boots cause it's declarative. ubuntu is not on its dependency management
— we use install.sh to make ubuntu work like nixos with declarative dependencies.'
NixOS is primary by KIND (it IS the declarative substrate); Ubuntu is made to ACT
declarative via install.sh + the manifests. The cost of Ubuntu is that simulation
layer; the value is community reach.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(ci): Ubuntu docker install.sh test (sibling to nixos) + zstd dep

Aaron 2026-05-30: 'center our docker tests around ubuntu and nixos, tests for both
with install.sh.' Ubuntu sibling to docker-nixos-install-sh-test:
  - tools/ci/dockerfiles/ubuntu-install-sh-test/Dockerfile: FROM ubuntu:24.04
    (digest-pinned via registry API 2026-05-30) -> apt bootstrap -> PATH ENV ->
    RUN install.sh (entropy lever) -> validate local-LLM (start daemon, assert
    pinned model, real chooseIndex probe + mock tests). The build IS the test.
  - manifests/apt: + zstd (ollama linux release is .tar.zst).
  - docker-ubuntu-install-sh-test.yml: direct docker build (first cut).

NixOS stays primary (declarative-by-construction; B-0940); this guards the Ubuntu
declarative-retrofit. FOLLOW-UP (Aaron's GHA-cache point): shared TS driver +
buildx cache type=gha for both OS tests so the heavy install bakes once.
Untestable from here (no local docker) -> iterates via CI off-leash.

actionlint clean. Triggers on push (the Ubuntu docker test runs now).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* accelerator(apt): declare .NET native runtime deps (libicu74 etc.) — bare-ubuntu fix

The docker-ubuntu-install-sh-test exposed it: mise installs the dotnet SDK but it
'exited with non-zero status' on a minimal ubuntu:24.04 image — missing libicu
(the classic cause) + libssl/krb5/tzdata. Full ubuntu runners have these
implicitly; the bare Docker image doesn't. Declaring them in manifests/apt makes
install.sh's entropy lever work on TRULY bare ubuntu (no-op on full ubuntu).

Per Microsoft Learn linux-scripted-manual .NET deps; build-essential already
covers libstdc++6/libgcc-s1/zlib1g. Ubuntu 24.04 (Noble) names: libicu74,
libssl3t64. Re-triggers the docker-ubuntu test; iterate if a Noble suffix differs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* ci(docker-nixos): also trigger on accelerator branch (off-leash NixOS validation)

The NixOS install.sh test only triggered on push-to-main, so off-leash install.sh
changes on the accelerator branch (incl. the new local-LLM step in linux.sh) were
never re-validated against the primary OS until harvest. Add the accelerator
branch to its push triggers (Aaron's off-leash-first model: get it right on the
accelerator, then main). Re-runs now → confirms install.sh doesn't break the
NixOS build with the local-LLM additions.

NOTE / follow-up: local-llm.sh downloads the GENERIC ollama linux binary, which
won't run on NixOS (non-FHS) — the test will pass (local-llm.sh is graceful), but
the local-LLM won't actually WORK on NixOS via that path. NixOS (the primary, per
B-0940) should get ollama via nixpkgs (declarative-native), not the Ubuntu
generic-binary retrofit. Tracked for a NixOS-native-ollama follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* backlog(B-0941): NixOS-native ollama — close the hole in the shield (test passes by SKIPPING)

The local-LLM primitive's NixOS path is a false-green: common/local-llm.sh
downloads the generic ollama binary (won't run on non-FHS NixOS) and skips
gracefully on failure, so docker-nixos-install-sh-test passes GREEN while the
local-LLM is actually non-functional on the PRIMARY OS.

Aaron 2026-05-30: the entropy shield isn't install.sh itself — 'the automated
tests around install.sh, that's the shield.' A shield with a hole reads as
covered. This row patches the hole, two halves both required:
  1. NixOS-native ollama (nixpkgs/services.ollama; local-llm.sh no-ops on NixOS)
  2. NixOS test ASSERTS the local-LLM works (real chooseIndex probe), fails if
     absent — graceful-skip is right for install.sh, wrong for the test.

Composes B-0940 (NixOS-primary eval). Off-leash; harvests with the install-graph.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(B-0941): NixOS-native ollama via nix + nixos test ASSERTS local-LLM (close the false-green)

The hole: local-llm.sh had mac(brew)/Linux(generic-binary) branches but NO NixOS
branch -> on NixOS it downloaded the generic glibc binary (won't run non-FHS) ->
graceful skip -> docker-nixos test GREEN while local-LLM non-functional on the
PRIMARY OS (the B-0941 false-green).

Fix (two halves):
1. local-llm.sh: detect /etc/NIXOS (same marker linux.sh already routes on) ->
   install ollama via nix (, fallback
   ). FHS-safe; works in the nixos/nix container AND
   on real NixOS; floats with the channel (consistent with float-ollama). Graceful
   on failure (never bricks install.sh). The declarative real-hardware self-heal
   layer (services.ollama in configuration.nix) is complementary; this is the
   install.sh-retrofit path that closes the test hole.
2. nixos Dockerfile: COPY tools/accelerator + validation step 4 that ASSERTS the
   local-LLM (start daemon, pinned model present, real chooseIndex probe, mock
   tests) and FAILS the build if absent. assert-don't-skip per the shield rule —
   graceful-skip is right for install.sh, wrong for the test.

Off-leash on the accelerator branch; the docker-nixos test now re-runs here (per
the trigger fix) to verify. Harvest-to-main is gated on this going green-WITH-assert
(non-reversible action -> the green-with-assert IS the verification).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(B-0941): nix-env-first + surface nix stderr (diagnose the suppressed install failure)

Artifact diagnosis of run 26685665012: 'NixOS detected → installing ollama via nix'
then 'nix ollama install failed' after ~39s — but the WHY was hidden by my own
2>/dev/null. A suppressed error can't be diagnosed (debugging-discipline miss).

Changes: (1) lead with nix-env -iA nixpkgs.ollama (the container's own Dockerfile
installs deps this way — proven to work there) before the flake form; (2) surface
nix stderr (2>&1) to the build log so the next cycle shows the real error if it
still fails; (3) broaden PATH to the per-user profile (nix-env's install target).
Still graceful (warn + exit 0). Off-leash re-validation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(B-0941): nix profile install --priority 6 (resolve coreutils file-collision) + drop broken nix-env path + SC2155

Root cause from the surfaced stderr (run 26685829032): nix-env -iA nixpkgs.ollama
fails with 'bad meta.outputsToInstall'; bare nix profile install hits a
coreutils-full FILE COLLISION in the profile (existing priority 5). Nix's own
message prescribes --priority. Fix: use nix profile install --priority 6
nixpkgs#ollama (existing coreutils wins the collision; ollama's own binary still
installs); drop the broken nix-env path entirely. Also drops the $(id -un) PATH
line (fixes shellcheck SC2155 — root cause + lint in one commit). Stderr stays
surfaced; still graceful.

The surface-the-error discipline paid off directly: nix told me the exact fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(B-0941): nix BUILD + symlink (no profile mutation) — sidestep the coreutils collision

Runs 26685829032 + 26685902159 (surfaced stderr) showed nix profile install hits a
coreutils-full file-collision that --priority 6 did NOT resolve (profile-install is
structurally collision-prone: ollama's closure brings coreutils-full vs the
profile's existing one). Robust fix: don't mutate the profile at all — nix build
the ollama store path (--no-link --print-out-paths) and symlink bin/ollama onto
PATH. No profile entry, no collision, FHS-safe in container + real NixOS. nix-env
path (bad meta.outputsToInstall) stays dropped. Stderr surfaced; graceful.

Bounded-iteration note: if this cycle also fails, I stop solo-grinding the slow CI
loop and surface options + a peer-call 2nd opinion (nix expertise) rather than
burn more cycles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* diag(B-0941): surface /tmp/ollama.log on daemon-unreachable (the install is SOLVED; daemon is the new wall)

Run 26685965605: nix-build install WORKED ('✓ ollama via nix build + symlink') —
the coreutils collision is gone. New narrower wall: ollama serve doesn't become
reachable (curl exit 7) at both install-time model-pull and the assert. The serve
stderr went to /tmp/ollama.log but was never shown on failure. Cat it on the curl
failure so the next run reveals WHY serve won't bind — the serve log is needed
whether I or a peer fixes it. Same surface-the-error discipline that cracked the
install collision.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(B-0941): LD_LIBRARY_PATH-clean ollama wrapper (diagnosed glibc symbol mismatch)

Run 26686054042 surfaced the exact root cause: 'ollama: symbol lookup error:
/usr/local/nix-glibc-lib/libc.so.6: undefined symbol __nptl_change_stack_perm,
version GLIBC_PRIVATE'. The nix-built ollama has the correct glibc in its RPATH,
but the docker-nixos test's global LD_LIBRARY_PATH (an FHS-mise glibc hack)
OVERRIDES the RPATH, forcing ollama onto the wrong libc. Docker-test-harness
artifact, not a real-NixOS bug.

Fix: replace the bare symlink with a wrapper that execs ollama via
'env -u LD_LIBRARY_PATH', so EVERY ollama call (install-time serve+pull AND the
test assert) runs clear of the pollution and uses ollama's own glibc. Single
point of fix; harmless on real NixOS/ubuntu/mac (LD_LIBRARY_PATH unset → no-op).

The install (nix build, collision-free) was already solved; this closes the
daemon-startup wall. Diagnosed, not guessed (surface-the-error discipline); if
this still fails it's genuinely weird → peer-call per the bound.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(local-llm): set-e gracefulness (mget + nix build) + nix GC-root via --out-link (Copilot #6120)

Scope-independent install-graph fixes on the off-leash source (the fixed
local-llm.sh is wanted whichever harvest scope lands). Three real Copilot findings:

- mget(): grep no-match (exit 1) or head SIGPIPE under set -euo pipefail would exit
  the script; "|| true" makes a missing key gracefully empty.
- nix build: a failing var=$(nix build ...) command-substitution exits before the
  warn+exit-0 fallback under set -e; moved the build into the if-condition (set-e
  exempt) so failure is graceful.
- GC-root: --no-link + raw --print-out-paths leaves the ollama store path
  un-GC-rooted (nix-collect-garbage could delete it out from under the wrapper);
  switched to --out-link $HOME/.local/state/zeta/ollama-result (an indirect GC
  root) and point the wrapper at the out-link, not a raw store path.

Off-leash re-validation (docker-nixos + docker-ubuntu) confirms --out-link still
installs ollama + pulls the model + the assert exercises.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(local-llm): loopback-host guard — close CodeQL file-data->outbound SSRF (required check on #6123)

CodeQL flagged the ollama host (from the file-sourced manifest) flowing unguarded
into the fetch URL (js SSRF taint). Real fix, not suppression: validate the host
is loopback (127.0.0.1 / localhost / ::1) before use. This is a genuine local-only
defense (a malicious manifest can't redirect the local LLM to exfiltrate prompts to
a remote) AND an explicit validator CodeQL sees between the file-source and the
fetch sink. The default + the manifest host are 127.0.0.1 so behavior is unchanged;
mock-backed unit tests unaffected (they don't construct ollamaBackend with a host).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(harvest): commit stranded install-graph review fixes

The bash-retirement allowlist entry for local-llm.sh, the B-0941
status->closed + Resolution, the inventory test count (13->14), and the
manifest name-attribution were edited in the worktree but never committed
— only the CodeQL loopback-guard commit was pushed. CI ran the pushed
commit (which lacked them), so:
  - bash-inventory: unexpected:1 (local-llm.sh not in committed allowlist)
  - BACKLOG-drift: committed B-0941 still `open`, BACKLOG.md reflects closed

Committing the stranded fixes makes the committed tree self-consistent:
  - local-llm.sh in EXPECTED_RETAINED_SHELL + RETAINED_SHELL_CATEGORY_BY_FILE
  - B-0941 status: closed (BACKLOG.md already matches a fresh regen)
  - inventory test setup/bootstrap count 14 (bun test: 18 pass / 0 fail)
  - manifests/local-llm attribution -> operator (role-ref lint)

Diagnosis credit: operator's "check if the drift check fails on other PRs"
falsified the "pre-existing CI quirk" hypothesis (other PRs pass), forcing
the real root cause — working-tree-clean != committed-clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(harvest): role-ref attribution + Ubuntu test covers main PRs (Copilot review)

Addresses the Copilot review on the harvest:

- Name attribution -> role-ref on current-state surfaces (workflows,
  manifests, Dockerfile, accelerator .ts, local-llm.sh): "Aaron 2026-05-30"
  -> "operator 2026-05-30", possessives -> "the operator's". Backlog/research
  .md history surfaces keep attribution; only code/config/manifest converted.

- docker-ubuntu-install-sh-test: add `pull_request` trigger (mirrors
  docker-nixos) so the Ubuntu install-graph is tested on PRs to main. It
  previously fired only on accelerator-branch pushes — after harvest that
  left main's Ubuntu path untested, the exact "shield with a hole" the
  test matrix exists to prevent. actionlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants