machine-admin prompt: correct the worked examples and state the exec compartment rules #24

Closed
opened 2026-08-28 17:09:53 +09:00 by floot · 1 comment
Owner

Tracking issue for the prompt side of the friction catalogued in #13–#20.

The machine-admin preset is the main interface documentation an agent gets, and
two of its worked examples do not run:

  1. await E(git).add(st.map(s => s.entry)) — status() is not an array (#14).
  2. await E(powers).storeValue(run, ...) for a deploy run — throws
    No corresponding formula (#13). Replace with the workflow-service path.

Missing information that cost turns in session mt82q1ns-l8nrge:

  • Filesystem caps take segment arrays, never slash strings (#15).
  • exec returns are JSON-serialized and BigInt throws (#16).
  • exec runs under lockdown: no Date.now, no Math.random, no timers (#17).
  • help() and __getMethodNames__() exist — call them before guessing (#19).
  • /mnt binds are slow enough to be a different tool than local disk (#2);
    prefer readText or a shell cap for inspection.
  • After an apply restarts the daemon: re-mint the remote, fetch before
    referencing a revision, and re-resolve run handles by id (#21).

Full analysis of the session that produced this list is in
endo-session-analysis.md (381 exec calls, 63 errored; 136 wrapped in
try/catch, 75 carrying a hand-written BigInt replacer, 32 spent reading
endo-src to learn an interface).

Tracking issue for the prompt side of the friction catalogued in #13–#20. The machine-admin preset is the main interface documentation an agent gets, and two of its worked examples do not run: 1. `await E(git).add(st.map(s => s.entry))` — `status()` is not an array (#14). 2. `await E(powers).storeValue(run, ...)` for a deploy run — throws `No corresponding formula` (#13). Replace with the workflow-service path. Missing information that cost turns in session `mt82q1ns-l8nrge`: - Filesystem caps take **segment arrays**, never slash strings (#15). - exec returns are JSON-serialized and **BigInt throws** (#16). - exec runs under lockdown: no `Date.now`, no `Math.random`, no timers (#17). - `help()` and `__getMethodNames__()` exist — call them before guessing (#19). - `/mnt` binds are slow enough to be a different tool than local disk (#2); prefer `readText` or a shell cap for inspection. - After an apply restarts the daemon: re-mint the remote, fetch before referencing a revision, and re-resolve run handles by id (#21). Full analysis of the session that produced this list is in `endo-session-analysis.md` (381 exec calls, 63 errored; 136 wrapped in try/catch, 75 carrying a hand-written BigInt replacer, 32 spent reading `endo-src` to learn an interface).
Author
Owner

Fixed in 046bfeb. Both broken examples are corrected: status() is destructured as { entries } and staged through E(mount).entry(e.path), and the deploy-run handle now points at the workflow service instead of storeValue. The prompt also states the exec compartment rules (no Date.now, no Math.random, no timers), that results are JSON-serialized, that path arguments take either spelling, that log() entries carry summary, and that results have no size bound. The test asserting the old storeValue(run, runName) text was updated to assert the replacement.

Fixed in 046bfeb. Both broken examples are corrected: `status()` is destructured as `{ entries }` and staged through `E(mount).entry(e.path)`, and the deploy-run handle now points at the workflow service instead of `storeValue`. The prompt also states the exec compartment rules (no `Date.now`, no `Math.random`, no timers), that results are JSON-serialized, that path arguments take either spelling, that `log()` entries carry `summary`, and that results have no size bound. The test asserting the old `storeValue(run, runName)` text was updated to assert the replacement.
floot closed this issue 2026-09-01 14:05:21 +09:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
floot/endo#24
No description provided.