Skip to content
Draft
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
25 changes: 19 additions & 6 deletions AGENT-SPEC.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Canonical st2 agent specification

This is the sole agent-authoring specification for this repository. It is pinned to st2
[`9887b2842222def0838c2cd82e6c24c218f7efa6`](https://github.com/compoundingtech/st2/commit/9887b2842222def0838c2cd82e6c24c218f7efa6)
(`0.1.0`, source `9887b28`). It documents the hand-authored KDL accepted at that commit. Do not infer
[`c6846f6239329f0803142afc06c15a07b93937c1`](https://github.com/compoundingtech/st2/commit/c6846f6239329f0803142afc06c15a07b93937c1)
(`0.1.0`, source `c6846f6`). It documents the hand-authored KDL accepted at that commit. Do not infer
additional fields or commands from older corpus fixtures.

st2 runs long-lived `service` agents made of interactive `pty` tasks and terminal-free `exec` tasks.
Expand Down Expand Up @@ -248,6 +248,20 @@ idempotently clears a restored inbox copy. New post-start unread work sends:
Subject and sender are normalized to one bounded printable line. Delivery is one bracketed-paste PTY send,
500 ms, then Return. DING does not inspect terminal pixels or classify modal state.

The issue #57 experimental matrix separately pins corrected st2 PR #123 at
`d7500b0fcad8bb268da9da96c0226d9caddbe305`. In that opt-in path, a compact
`ding { adapter { argv ... } }` lowers to a generated exec sidecar whose argv is
expanded only after the complete managed task environment is known. Core
consumes a provider-neutral activity/input-buffer lease, requires exact PTY
generation/activity sequence plus I/O revision, and performs one atomic
guarded send only for fresh `idle` + `empty`. A generic `ding-control
hook-owned` receipt removes exact unread filenames from PTY work when an
already-occurring post-turn hook owns their next-context delivery. The
integrated model-free A/B covers 11 durable messages: the aggressive arm makes
six non-idle/colliding PTY writes and the configured hook-plus-idle arm makes
zero. Real-provider fixtures, live-pane acceptance, merge, and release remain
outside that evidence.

Arrivals remain FIFO. `busy` and `away` do not suppress delivery; only fresh `dnd` does. Non-DND presence is
refreshed every five minutes, while abandoned DND ages to derived `unknown` after 15 minutes and delivery
resumes. Failed PTY sends retain the queue head. Startup backlog produces one generic unread-work DING rather
Expand Down Expand Up @@ -432,8 +446,7 @@ Inspect the declaration, every referenced template, and every workspace destinat
materialization command. Materialization is byte-idempotent and does not imply hook installation. Starting
the network is a separate, explicitly authorized action.

For source `9887b28`, the accepted Linux executable has SHA256
`d49d44fd4f3f6f655455c212353a469fefa956082bedf22163deb767d8a36a0d`; its published archive has SHA256
`32ee103bd17ccb3e155ac63d816a3906c2470a3c98e3cc04b56e5a67138b9927`. `bin/check-corpus.sh` verifies
the variable-age version contract, exact installed binary, embedded full source commit, strict semantic
For source `c6846f6239329f0803142afc06c15a07b93937c1`, the accepted local-source Linux executable has
SHA256 `2bba8d58be24250bc262f75f835ce2d780369add275774f3f2135c623d23d29c`. `bin/check-corpus.sh` verifies
the variable-age version contract, exact installed binary, shared source-pin consistency, strict semantic
validation, fixture resets, and the rest of the model-free corpus gate before an eval may run.
16 changes: 14 additions & 2 deletions CATALOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Generated by bin/generate-catalog.sh from cell KDL and evidence/*.tsv. Do not edit. -->
# Current eval catalog and evidence

This is the sole current corpus surface: **45 included cells** (14 model-free,
This is the sole current corpus surface: **51 included cells** (20 model-free,
31 model-backed) and **4 retired exclusions**. Inventory fields are derived from the active
KDL and executable judge scripts. Latest accepted PASS evidence remains distinct from the append-only run
history: a failed last run is visible without being advertised as accepted evidence, and cells with no
Expand All @@ -18,7 +18,13 @@ harness-native loader plus canonical hook file.
|---|---|---|---:|---|---|---:|---|---|
| `context-resource-continuity` | model-free | — | 0 | none | `90s` | 4 | — | **NO STRUCTURED RUN** |
| `crash-ding` | mixed | `claude-sonnet-5+gpt-5.6-sol` / medium | 4 | high | `180s` | 5 | — | **NO STRUCTURED RUN** |
| `ding-adapter-fixture-contract` | model-free | — | 0 | none | `30s` | 7 | — | **NO STRUCTURED RUN** |
| `ding-delivery-a-aggressive-control` | model-free | — | 0 | none | `45s` | 7 | — | **NO STRUCTURED RUN** |
| `ding-delivery-pty-ab` | model-free | — | 0 | none | `120s` | 8 | — | **NO STRUCTURED RUN** |
| `ding-delivery-st2-rich-ab` | model-free | — | 0 | none | `120s` | 10 | — | **NO STRUCTURED RUN** |
| `ding-mode` | Claude | `claude-sonnet-5` / medium | 2 | medium | `1200s` | 4 | — | **NO STRUCTURED RUN** |
| `ding-pty-activity-lease` | model-free | — | 0 | none | `60s` | 8 | — | **NO STRUCTURED RUN** |
| `ding-pty-guarded-send` | model-free | — | 0 | none | `90s` | 8 | — | **NO STRUCTURED RUN** |
| `ding-reply` | Claude | `claude-sonnet-5` / medium | 1 | low | `420s` | 2 | — | **NO STRUCTURED RUN** |
| `docs` | Claude | `claude-sonnet-5` / medium | 3 | high | `1200s` | 5 | — | **NO STRUCTURED RUN** |
| `exec-lifecycle-logging` | model-free | — | 0 | none | `90s` | 5 | — | **NO STRUCTURED RUN** |
Expand Down Expand Up @@ -82,6 +88,12 @@ while the last-run column makes a recorded failure distinct from a cell with no
## Harness hook exclusions

- `context-resource-continuity` / `cell` — deterministic native context/resource restart probe; no harness seat
- `ding-adapter-fixture-contract` / `cell` — deterministic fixture provenance and blocker contract; no bus-connected agent
- `ding-delivery-a-aggressive-control` / `cell` — deterministic unconfigured DING ordinary-input control; no harness or model agent
- `ding-delivery-st2-rich-ab` / `cell` — deterministic exact-source configured generic-adapter versus aggressive DING A/B; no harness or model agent
- `ding-delivery-pty-ab` / `cell` — deterministic PTY-boundary aggressive-versus-guarded delivery A/B; no harness or model agent
- `ding-pty-activity-lease` / `cell` — deterministic exact-source PTY activity-lease probe; no harness or model agent
- `ding-pty-guarded-send` / `cell` — deterministic exact-source PTY compare-and-send race probe; no harness or model agent
- `docs` / `judge:cold-reader` — one-shot offline Claude print grader; no bus identity, DING, or hook surface
- `exec-lifecycle-logging` / `cell` — deterministic native exec lifecycle probe; no harness seat
- `hook-integrity` / `cell` — deterministic native hook-installation probe; no live harness seat
Expand All @@ -97,7 +109,7 @@ while the last-run column makes a recorded failure distinct from a cell with no
- `targeted-reconcile-isolation` / `cell` — deterministic selected reconcile isolation probe; no bus-connected agent
- `two-networks-coexist` / `cell` — deterministic catalog-isolation probe; no harness seat

These **15** rows are generated from structured exclusions. A cell-level row is required for
These **21** rows are generated from structured exclusions. A cell-level row is required for
every derived model-free cell. The one-shot docs cold reader is a model-backed grader, but not a bus-connected
agent: it has no st2 identity, DING sidecar, or lifecycle hooks.

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,26 @@ VERDICT: PASS
```

Requirements are `st2 0.1.0` from source
[`9887b28`](https://github.com/compoundingtech/st2/commit/9887b2842222def0838c2cd82e6c24c218f7efa6),
[`c6846f6`](https://github.com/compoundingtech/st2/commit/c6846f6239329f0803142afc06c15a07b93937c1),
using the accepted local-source Linux binary SHA256
`2bba8d58be24250bc262f75f835ce2d780369add275774f3f2135c623d23d29c`;
`pty`, Bash, Git, `jq`, Rust/Cargo for the pinned KDL parser gate, and Node for JavaScript fixtures. A paid cell
also needs every harness named by its dry-run row.

The issue #57 PTY draft experiments are separately pinned to activity PR #131
`46c71d31c0d6daee43adf568061b2b84a65ae8c0` and stacked guarded-send PR #133
`743ceb796a41a3282e31382575bff0d0e3826d59`. Run their model-free cells with
`EVALS_PTY_PR133_ROOT` pointing to a clean exact-head checkout built by
`npm ci && npm run build`; the cells reject any other Git head or package lock.

The integrated configured-DING A/B additionally pins corrected st2 PR #123
`d7500b0fcad8bb268da9da96c0226d9caddbe305` and its accepted local-source Linux
release binary SHA256
`705ad3ebd0bce497a4117c7c7993505c0579fc1f7df2421e0525a22208f6949f`.
Set `EVALS_ST2_PR123_ROOT` to a clean exact-head checkout built with
`cargo build --release --locked`; the cell launches the generated configured
sidecar from that artifact and rejects a different source, lockfile, or binary.

## Cell layout

```text
Expand Down
20 changes: 7 additions & 13 deletions bin/check-corpus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,20 @@ set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$repo_root"

expected_source="9887b28"
expected_source_full="9887b2842222def0838c2cd82e6c24c218f7efa6"
expected_binary_sha256="d49d44fd4f3f6f655455c212353a469fefa956082bedf22163deb767d8a36a0d"
expected_version_regex='^st2 0\.1\.0 — running from local source \(9887b28, .+ ago\)$'
source bin/st2-pin.sh
bin/check-st2-pin-consistency.sh
st2_path="$(command -v st2)"
actual_version="$(st2 --version)"
[[ "$actual_version" =~ $expected_version_regex ]] || {
echo "FAIL: expected st2 0.1.0 from pinned source $expected_source, found $actual_version" >&2
[[ "$actual_version" =~ $ST2_VERSION_REGEX ]] || {
echo "FAIL: expected st2 0.1.0 from pinned source $ST2_SOURCE_SHORT, found $actual_version" >&2
exit 1
}
actual_binary_sha256="$(sha256sum "$st2_path" | awk '{ print $1 }')"
[ "$actual_binary_sha256" = "$expected_binary_sha256" ] || {
echo "FAIL: expected st2 binary sha256 $expected_binary_sha256, found $actual_binary_sha256 at $st2_path" >&2
[ "$actual_binary_sha256" = "$ST2_BINARY_SHA256" ] || {
echo "FAIL: expected st2 binary sha256 $ST2_BINARY_SHA256, found $actual_binary_sha256 at $st2_path" >&2
exit 1
}
LC_ALL=C grep -aFq "$expected_source_full" "$st2_path" || {
echo "FAIL: st2 binary at $st2_path does not embed full pinned source $expected_source_full" >&2
exit 1
}
echo "PASS: pinned runner source $expected_source ($actual_version; sha256 $actual_binary_sha256)"
echo "PASS: pinned runner source $ST2_SOURCE_FULL ($actual_version; sha256 $actual_binary_sha256)"

mapfile -d '' shell_files < <(
find bin cells -type f -name '*.sh' -not -path '*/_git/*' -print0 | sort -z
Expand Down
3 changes: 3 additions & 0 deletions bin/check-preflight-safety.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ reachable=(
bin/check-preflight-safety.sh
bin/check-run-history.sh
bin/check-retired-surfaces.sh
bin/check-st2-pin-consistency.sh
bin/check-st2-semantic.sh
bin/check-vrs-scope-drift.sh
bin/check-vrs-variations.sh
bin/check-weird-git-setup.sh
bin/corpus-inventory.sh
bin/generate-catalog.sh
bin/model-seat-inventory.sh
bin/st2-pin.sh
)
materializers=(
cells/signal-rename/fixture/materialize.sh
Expand Down Expand Up @@ -68,6 +70,7 @@ expected_direct=(
bin/check-preflight-safety.sh
bin/check-retired-surfaces.sh
bin/check-run-history.sh
bin/check-st2-pin-consistency.sh
bin/check-st2-semantic.sh
bin/check-vrs-scope-drift.sh
bin/check-vrs-variations.sh
Expand Down
21 changes: 21 additions & 0 deletions bin/check-st2-pin-consistency.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$repo_root"
source bin/st2-pin.sh

grep -Fq "$ST2_SOURCE_FULL" AGENT-SPEC.md
grep -Fq "$ST2_SOURCE_FULL" README.md
grep -Fq "$ST2_BINARY_SHA256" AGENT-SPEC.md
grep -Fq "$ST2_BINARY_SHA256" README.md
grep -Fq 'source bin/st2-pin.sh' bin/check-corpus.sh

if rg -n \
'9887b28|d49d44fd4f3f6f655455c212353a469fefa956082bedf22163deb767d8a36a0d' \
AGENT-SPEC.md README.md bin/check-corpus.sh bin/st2-pin.sh; then
echo "FAIL: active st2 pin surfaces retain the superseded source or binary hash" >&2
exit 1
fi

echo "PASS: active spec, README, and executable preflight share st2 $ST2_SOURCE_FULL / $ST2_BINARY_SHA256"
6 changes: 6 additions & 0 deletions bin/st2-pin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

ST2_SOURCE_SHORT="c6846f6"
ST2_SOURCE_FULL="c6846f6239329f0803142afc06c15a07b93937c1"
ST2_BINARY_SHA256="2bba8d58be24250bc262f75f835ce2d780369add275774f3f2135c623d23d29c"
ST2_VERSION_REGEX='^st2 0\.1\.0 — running from local source \(c6846f6, .+ ago\)$'
59 changes: 59 additions & 0 deletions cells/ding-adapter-fixture-contract/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ding-adapter-fixture-contract

Hermetic, model-free contract inventory for the optional DING activity-lease
matrix tracked by [evals#57](https://github.com/compoundingtech/evals/issues/57).

This cell validates only inputs that are safe to establish before the product
seams exist:

- nine shared, synthetic ASCII screen diagnostics;
- exact content hashes and provenance metadata;
- symmetric, explicitly blocked activity-event and post-turn-hook fixture
slots for the two maintained provider adapters;
- matched A/B outcome and generic conditional-send race inventories; and
- the external dependency/evidence ledger, including exact runnable-draft PTY
heads and the still-blocked adapter/core seams.

The screen text and requested terminal diagnostics are never activity
authority. No provider event payload or adapter interface is guessed here.
The exact PTY activity and guarded-send product surfaces are now exercised by
`ding-pty-activity-lease` and `ding-pty-guarded-send` against stacked draft head
`743ceb796a41a3282e31382575bff0d0e3826d59`, which contains activity head
`46c71d31c0d6daee43adf568061b2b84a65ae8c0`. Those runs are local exact-source
experiment evidence, not release artifacts. Corrected st2 PR #123 at
`d7500b0fcad8bb268da9da96c0226d9caddbe305` now supplies the generic configured
sidecar, managed-task-env argv expansion, guarded-send integration, DND/error
holds, typed ownership receipts, and generic hook-control ingress. The
`ding-delivery-st2-rich-ab` cell exercises that draft end to end with a
synthetic adapter; merge/release and real-provider acceptance remain blocked.

The intended opt-in shape is an external adapter command selected by DING
through a generic protocol. Provider commands may differ, but core st2 and the
shared eval judge must not branch on provider identity. The generic
selection/envelope and hook ownership contract are pinned by st2 PR #123.
Provider-specific activity translation, composer evidence, and hook payload
fixtures remain blocked on immutable owner artifacts.

The A/B inventory freezes the intended comparison without pretending it can
execute unfinished behavior. The conditional-send inventory names races and
outcomes only: a provider adapter must establish fresh idle plus an empty
composer, while PTY must atomically reject a DING candidate if its live
generation or generic I/O/snapshot revision changed. PTY does not classify
submit, newline, or human intent.

## Validation boundary

The scaffold cell, parser, semantic loader, fixture-reset, harness-exclusion,
preflight-reachability, generated-catalog, and full corpus gates are
model-free. The accepted successor runner is exact source
`c6846f6239329f0803142afc06c15a07b93937c1` with local-source Linux binary
SHA256 `2bba8d58be24250bc262f75f835ce2d780369add275774f3f2135c623d23d29c`.
Do not rebuild or substitute a different binary to claim the full corpus gate.

The PTY cells additionally require `EVALS_PTY_PR133_ROOT` to point to a
clean exact-head checkout after `npm ci && npm run build`. They verify the Git
head, activity-base ancestry, package-lock hash, and runtime artifact hashes in
their receipts. The integrated cell also requires `EVALS_ST2_PR123_ROOT` at
exact corrected head `d7500b0fcad8bb268da9da96c0226d9caddbe305` after
`cargo build --release --locked` and pins binary SHA256
`705ad3ebd0bce497a4117c7c7993505c0579fc1f7df2421e0525a22208f6949f`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Seam-independent fixture and provenance contract for the optional DING activity lease.
eval {
copy "./fixture"
max-timeout "30s"

run "fixture-contract" {
command "bash ./check-fixtures.sh"
}

judges {
judge "DIAGNOSTICS — nine shared ASCII screens are exact, hashed, and non-authoritative" {
exec "grep -Fqx DIAGNOSTIC-FIXTURES-GREEN-57d1 $RUNS_DIR/fixture-contract.out"
}
judge "PARITY SLOTS — every declared provider reserves the same activity and post-turn hook cases" {
exec "grep -Fqx PROVIDER-SLOTS-GREEN-57d1 $RUNS_DIR/fixture-contract.out"
}
judge "A/B CONTRACT — matched workloads preserve durability while B eliminates active-turn PTY input" {
exec "grep -Fqx AB-INVENTORY-GREEN-57d1 $RUNS_DIR/fixture-contract.out"
}
judge "CONDITIONAL SEND — generic I/O races reject the DING candidate without terminal heuristics" {
exec "grep -Fqx CONDITIONAL-SEND-INVENTORY-GREEN-57d1 $RUNS_DIR/fixture-contract.out"
}
judge "PROVENANCE — every ready asset has reviewed metadata and every provider asset is explicitly blocked" {
exec "grep -Fqx PROVENANCE-INVENTORY-GREEN-57d1 $RUNS_DIR/fixture-contract.out"
}
judge "SEAMS — exact draft PTY/st2 surfaces and remaining provider blockers are classified without invention" {
exec "grep -Fqx PRODUCT-BLOCKERS-GREEN-57d1 $RUNS_DIR/fixture-contract.out && grep -Fqx PTY-DRAFT-SEAMS-GREEN-57d1 $RUNS_DIR/fixture-contract.out"
}
judge "MODEL FREE — the scaffold contains no provider payload, provider launch, network, or model call" {
exec "grep -Fqx HERMETIC-SKELETON-GREEN-57d1 $RUNS_DIR/fixture-contract.out"
}
}
}
10 changes: 10 additions & 0 deletions cells/ding-adapter-fixture-contract/fixture/ab-cases.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
case_id a_delivery b_delivery durable_expectation fifo_expectation model_calls b_pty_bytes b_collision_goal
idle aggressive-pty bounded-idle-wake eventual-exactly-once preserve 0 exactly-one zero
active-turn aggressive-pty next-hook-context eventual-exactly-once preserve 0 zero zero
long-child aggressive-pty hold-until-authorized eventual-exactly-once preserve 0 zero zero
dnd dnd-hold-then-deliver dnd-hold-then-authorize eventual-exactly-once preserve 0 zero-while-held zero
stale-unknown aggressive-pty hold-until-authorized eventual-exactly-once preserve 0 zero zero
hook-failure aggressive-pty durable-hold-until-authorized eventual-exactly-once preserve 0 zero zero
crash-restart restart-backlog durable-hold-until-authorized eventual-exactly-once preserve 0 zero-before-authorization zero
compaction-clear aggressive-pty hold-until-authorized eventual-exactly-once preserve 0 zero zero
fifo-burst aggressive-fifo authorized-fifo eventual-exactly-once preserve 0 bounded-by-messages zero
Loading