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
35 changes: 35 additions & 0 deletions .github/workflows/capu-atman-http-recovery-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CaPU ATMAN loopback HTTP recovery
on:
pull_request:
paths:
- 'experiments/capu_atman_recovery_v1/**'
- 'experiments/capu_atman_http_recovery_v2/**'
- '.github/workflows/capu-atman-http-recovery-v2.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
bounded-http:
runs-on: ubuntu-latest
timeout-minutes: 8
strategy:
fail-fast: false
matrix:
python: ['3.11', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: python -m pip install -r experiments/capu_atman_recovery_v1/requirements.txt
- run: python experiments/capu_atman_recovery_v1/bootstrap.py
- run: python experiments/capu_atman_recovery_v1/run.py --output evidence-v1
- run: python experiments/capu_atman_http_recovery_v2/run.py --output evidence-v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: capu-atman-http-python-${{ matrix.python }}
path: |
evidence-v1/
evidence-v2/
if-no-files-found: error
34 changes: 34 additions & 0 deletions .github/workflows/capu-atman-recovery-v1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CaPU ATMAN recovery laboratory
on:
pull_request:
paths:
- 'experiments/capu_atman_recovery_v1/**'
- '.github/workflows/capu-atman-recovery-v1.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
bounded-composition:
runs-on: ubuntu-latest
timeout-minutes: 8
strategy:
fail-fast: false
matrix:
python: ['3.11', '3.13']
defaults:
run:
working-directory: experiments/capu_atman_recovery_v1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: python -m pip install -r requirements.txt
- run: python bootstrap.py
- run: python run.py --output evidence
- uses: actions/upload-artifact@v4
if: always()
with:
name: capu-atman-recovery-python-${{ matrix.python }}
path: experiments/capu_atman_recovery_v1/evidence/
if-no-files-found: error
2 changes: 2 additions & 0 deletions experiments/capu_atman_http_recovery_v2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__/
evidence/
92 changes: 92 additions & 0 deletions experiments/capu_atman_http_recovery_v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# CaPU × ATMAN — bounded loopback HTTP recovery v2

This experiment extends the **process boundary**, not the production claim.
The v1 source and PR #103 head (`977864167c65f161e6db87b3d14257a11a67516f`)
remain unchanged. This candidate belongs on a separate branch and **draft PR**.
No merge, deployment, main publication, or ready-for-review transition.

## What is actually external?

1. A controller subprocess owns only its controller SQLite path and a loopback URL.
2. A separate HTTP device process executes a non-idempotent counter append in its
own SQLite ledger. The durable insertion **is** the effect in this lab.
3. A third, stdlib-only observer process opens that device ledger read-only. It
counts actual requests/effects and hashes the observed rows, without importing
controller code or reading controller state.

This is a real TCP/HTTP and process boundary on **one trusted host**, not a real
payment, physical actuator, third-party deployment, WAN or independent attestor.
Process separation does not create OS permission separation. The device deliberately
accepts direct lab calls; bypass-resistant endpoint enforcement is out of scope.

## Central scenario

```
ATMAN authority -> durable A6 UNKNOWN reservation -> one HTTP POST
-> device effect committed -> response held/lost
-> independent observer sees effect -> controller process killed
-> new controller process refuses retry while UNKNOWN
-> policy changes -> exact historical positive receipt arrives
-> A7 reconciliation commits outcome -> new attempts remain blocked
```

The device database path is never passed to a controller worker. The observer
triggers the kill only after it has read the effect, while the controller is
still awaiting the held response. The controller and device have no shared
transaction. A receipt query with no matching row returns UNKNOWN, never a
manufactured NOT_COMMITTED. HTTP 503, malformed JSON and socket timeout do not
release the reservation. The HTTP client makes one request with no automatic
retry, redirect or proxy behavior.

## Tests and equal-guarantee comparison

There are 14 named scenarios for each of two arms (28 tests): normal ACK,
connection loss after/before the effect, HTTP 503 after the effect, malformed ACK,
observer-triggered controller kill, timeout, device-process restart, receipt
tampering, full-token receipt lookup, competing dispatch workers, stale authority,
receipt replay, and unguarded direct-call duplication.

The ordinary FSM arm shares HTTP/SQLite I/O, ATMAN authority verification and the
synthetic receipt primitive, but not native CaPU lifecycle transitions. The runner
compares the recorded controller states and **independently observed device rows**
for every named scenario, not merely test pass counts.

The unguarded control intentionally sends two identical HTTP effect requests:
they must produce two effects. An ambiguous duplicate ledger yields CONFLICT,
not a fabricated clean COMMITTED receipt. This control also demonstrates the
explicit lack of bypass resistance; it is not an architectural superiority claim.

## Reproduce

From repository root (Python 3.11 or 3.13):

```sh
python -m pip install -r experiments/capu_atman_recovery_v1/requirements.txt
python experiments/capu_atman_recovery_v1/bootstrap.py
python experiments/capu_atman_recovery_v1/run.py --output evidence-v1
python experiments/capu_atman_http_recovery_v2/run.py --output evidence-v2
```

The isolated workflow bootstraps the three pinned upstream modules, runs both
suites, and uploads results. `result.json` includes source hashes, environment,
all observations and a digest. Check the exit code and actual CI run: a local
PASS is not CI PASS or review approval. Source verification pins the reused v1
bootstrap and adapter; upstream modules are verified by the unchanged bootstrap.

## Non-claims / review boundary

- Public deterministic fixture keys and A7 synthetic rotate/XOR receipt tags are
unchanged. No production authentication or cryptographic security claim.
- One trusted controller/device/lineage, one unresolved attempt. No general
exactly-once or liveness guarantee; UNKNOWN may remain blocked indefinitely.
- No physical power-loss/NVRAM, storage rollback, Byzantine device, malicious
host, distributed atomic commit or production transport proof.
- Authorization linearizes at durable admission, not at physical actuation.
A late positive receipt records history; it does not renew old authority.
- The observer is a separate observation path, not an independent organization,
timestamp, trust anchor, or proof that all external events were recorded.
- No CPU/FPGA speed, energy, full ATMAN, Bardo/COSMIC integration, or advantage
over the equal-guarantee ordinary FSM is established.
- Only native Codex review is the review gate. One request per final candidate
head; do not mutate that head after review. Keep draft and unmerged if quota
prevents review. Tests or manual inspection are not review approval.
Loading
Loading