Skip to content

Commit d509d41

Browse files
committed
📝 Move the remote effects from owed to shipped
Seven capabilities merged under this document's base, and four of them change what it may say in the present tense. `<Git.Push>` and `<PullRequest>` are registered workflow-host components now (#495, #500, #504), so they leave the unresolved inventory and join the built list beside the composition and the local Git effects. Push publishes the selected checkout's exact current branch and commit to the same branch at canonical `origin`, with no props, no result, no force-push, no upstream change and no implicit stage or commit. The pull request requires that Push's own matching successful evidence and never publishes anything itself. Eight names are host-registered; two — `<Expand>` and `<Issue>` — still resolve to nothing. The upsert is settled, and this markup does not reach it. Without a number `<PullRequest>` asks for one to exist; with a number it asks for that one to say this. A revision iteration commits again, so the head it asks about is not the head the existing pull request holds, and an unnumbered request over an open pull request saying anything else is a deliberate conflict. Carrying the bound number into the next iteration is a composition this document cannot write today, so the markup stands and the gap is recorded under #301 rather than spelled by guesswork. #497 shipped the evaluator, for observation. Complete preflight inside the admission, pinned identities that consult no directory or bundle, exact request ceilings, one retained decision, and a continuation held to the ceilings it was admitted under. What it does not admit is file mutation — so the prose that had `<Expand>` publishing each admitted `<File>` now says which half is built, and `<Expand>` itself stays a documented placeholder #369 owes. #498 shipped explicit history forks, so forkability stops being described as absent: `history --forkable` adds its two columns, and lineage, reasons, changed-definition replay admission and retained Workspace-root copying come with it. A run continuing another run's history is still a different thing from an Agent provider continuing a session, and nothing schedules either. A `<Test>` declares its own timeout (#503), so twenty seconds is a default rather than a ceiling. The two comments that justified the TypeScript proof by that ceiling now give the reason that actually holds: a stub provider makes the whole twenty-call trace observable in under a second, where a long ACP scenario would take longer to prove less. `<Execution host="run">` (#501) is inherited and unmentioned — no document here discusses nested root execution.
1 parent 8b1e369 commit d509d41

9 files changed

Lines changed: 246 additions & 141 deletions

File tree

‎scripts/tests/adversarial-planning-workflow.test.ts‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
* #290 criterion 6 — an exhausted planning loop.
33
*
44
* `Planning` declares `<Loop name="planning" max={5}>`, so exercising every
5-
* failing iteration costs twenty agent turns in one invocation. That does not
6-
* fit the fixed twenty-second `<Test>` timeout when each turn is an ACP round
7-
* trip, so the run happens here instead: the real `Planning` component, one
8-
* execution, one contextual working directory, and a synchronous stub root
9-
* Agent provider in place of the transport.
5+
* failing iteration costs twenty agent turns in one invocation. A `<Test>` can
6+
* declare its own timeout (#503) and twenty seconds is only the default, so the
7+
* bound is not what decides this. What decides it is the evidence: the run
8+
* happens here because the stub root Agent provider makes the complete
9+
* twenty-call trace and the authorization boundary directly observable, and
10+
* finishes in well under a second. A long ACP scenario would take longer to
11+
* prove less. So: the real `Planning` component, one execution, one contextual
12+
* working directory, and a synchronous stub root Agent provider in place of the
13+
* transport.
1014
*
1115
* Nothing about the document under test changes. The component resolves from
1216
* the workflow directory exactly as `xmd test` resolves it, including the

‎specs/adversarial-implementation-workflow.md‎

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ source that performed it, the implementor's report, and the pull request's
290290
identity. A verdict describes that head alone, and a moved head requires a fresh
291291
review.
292292

293-
`<PullRequest>`'s creation result is deliberately minimal: stable provider
294-
identity, number, URL, state, head SHA and base SHA (#295). Existing reviews,
293+
`<PullRequest>`'s result is deliberately minimal: filtered Repository identity,
294+
stable provider identity, number, URL, open state, head SHA and base SHA (#295,
295+
shipped). Existing reviews,
295296
comments and check results are separate reads rather than fields on a creation
296297
result that would otherwise claim to stay fresh against a remote that keeps
297298
changing. **That read is `<Fetch>`'s** (#456, shipped): a document reads over
@@ -495,19 +496,24 @@ explicit composition rather than one implicit workspace:
495496
unresolved, which says which host ran the document rather than whether the
496497
component exists.
497498
- `<Git.Switch>`, `<Git.Add>` and staged-only `<Git.Commit>` operate on the
498-
contextual checkout as Workspace-local durable effects (#294). `<Git.Push>` is
499-
explicit and separate (#370), and `<PullRequest>` requires that pushed head
500-
rather than performing a hidden push (#295).
499+
contextual checkout as Workspace-local durable effects (#294). `<Git.Push />`
500+
is explicit and separate (#495, shipped): it publishes the selected checkout's
501+
exact current named branch and commit to the same branch at canonical
502+
`origin`, with no props, no result, nothing rendered, no force-push, no
503+
upstream change and no implicit stage or commit. `<PullRequest>` requires that
504+
Push's own matching successful evidence rather than performing a hidden push
505+
(#295, shipped).
501506
- `<Issue>` reconciles an approved deferred finding (#296), over the shared
502507
external reconciliation of #297.
503508

504509
Each environmental operation declares its inputs and preconditions, reconciles
505510
existing state, returns a structured result, and records its observed effects. A
506511
result is a structure, never a string standing in for one: `<PullRequest>`
507-
resolves stable provider identity, number, URL, state, head SHA and base SHA, and
508-
a stage that declared any of that as text would fail its own return validation
509-
after the effect had already happened. Rerunning a pull-request operation
510-
resolves the existing pull request rather than creating a duplicate, through the
512+
resolves filtered Repository identity, stable provider identity, number, URL,
513+
open state, head SHA and base SHA, and a stage that declared any of that as text
514+
would fail its own return validation after the effect had already happened.
515+
Rerunning a pull-request operation resolves the existing pull request rather than
516+
creating a duplicate, through the
511517
effect's natural key as well as its stable identity (#297).
512518

513519
`<Git.Commit>` journals reconciliation evidence — repository and worktree
@@ -632,9 +638,12 @@ The wait is built too: `suspendFor()` suspends a run durably and gives its
632638
executor lock back (#367), and a typed answer can be delivered to it (#300).
633639
What is not built is anything that reaches or acts on it — no v1 Markdown
634640
element spells the operation, this workflow calls nothing that suspends,
635-
delivery executes nothing, and no scheduler resumes a run. Versioned history
636-
checkpoints, compatible forks, `history --forkable`, and forkability reasons
637-
remain #368.
641+
delivery executes nothing, and no scheduler resumes a run. Versioned history checkpoints, compatible forks,
642+
`history --forkable`, forkability reasons, lineage, changed-definition replay
643+
admission and retained Workspace-root copying are shipped (#368, delivered by
644+
#498). A fork is an explicit new run continuing one run's retained history; it
645+
is not an Agent provider continuing a session, and nothing schedules or resumes
646+
either.
638647

639648
**Still missing: who answered.** The journal records the validated decision, the
640649
question fingerprint, and the document execution it belongs to. It does not
@@ -874,8 +883,10 @@ The exercise succeeds when:
874883
7. The run composes a named Repository and Worktree from its pinned base before
875884
discovery; the change reaches that worktree as admitted generated XMD rather
876885
than as agent writes, and validation evidence is recorded.
877-
8. `<Git.Add>`, `<Git.Commit>`, and an explicit `<Git.Push>` precede
878-
`<PullRequest>`, and none of them is implied by another.
886+
8. `<Git.Add>`, `<Git.Commit>`, and an explicit `<Git.Push />` precede
887+
`<PullRequest>`, and none of them is implied by another: the pull request
888+
requires the run's own matching successful Push evidence and never publishes
889+
anything itself.
879890
9. The planner reviews the resulting pull request, and implementation and
880891
review repeat when the verdict fails.
881892
10. The user decides whether to accept the completed change.
@@ -978,18 +989,20 @@ The exercise must resolve enough of these to implement one vertical slice:
978989
1. What bounded request/result loop lets an Agent observe the repository at all,
979990
given that it receives no checkout, no materialization, no working directory
980991
and no registered directory (#302, #369)?
981-
2. What is the public spelling and response schema of the constrained
982-
generated-XMD evaluator, and which components does the first allowlist admit
983-
(#369)?
984-
3. What state makes external effects safe to repeat or resume after
985-
interruption, and how does a revision iteration reach the *same* pull request
986-
rather than a second one — expansion identity alone cannot answer it, so the
987-
effect's natural key has to, and a head that deliberately advanced on the same
988-
branch must be distinguishable from a conflicting one (#295, #297)?
989-
4. Which fetches does a review actually write? `<PullRequest>`'s creation result
990-
is deliberately minimal, and `<Fetch>` (#456) is how a network-denied reviewer
991-
is handed the rest — but no stage composes those reads yet, and admitting
992-
`<Fetch>` inside generated XMD stays #369's.
992+
2. What is the public spelling of the component a document writes to expand
993+
constrained generated XMD, and what does a *mutating* fragment's admission
994+
require (#369)? The evaluator itself is settled and built for observation
995+
(#497): complete preflight inside the admission, pinned identities, exact
996+
request ceilings, one retained decision, and replay held to it.
997+
3. How does a revision iteration reach the *same* pull request? The effect is
998+
settled (#295, #500, #504): an unnumbered invocation asks for one to exist
999+
and a numbered one asks for that exact open pull request to say this. What is
1000+
unsettled is the composition — a loop whose first iteration has no number to
1001+
carry and whose later iterations do (#301).
1002+
4. Which fetches does a review actually write? `<PullRequest>`'s result is
1003+
deliberately minimal, and `<Fetch>` (#456) is how a network-denied reviewer is
1004+
handed the rest — but no stage composes those reads yet, and the public
1005+
component that expands a fragment carrying one stays #369's.
9931006
5. Which host mechanism closes the validate-then-use race for each supported
9941007
runtime, now that a run-owned Workspace resolves a document path without
9951008
producing a host path at all (#227)?

‎specs/markdown-agents-vision.md‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,11 @@ supplies the run around them: `xmd workflow start` creates a workflow run with
197197
one retained Workspace and `xmd workflow resume` continues it from the retained
198198
journal (#366, shipped). The composition inside that run is there too: named
199199
`<Repository>`, `<Worktree>` and lexical `<Dir>` are registered by the workflow
200-
host (#293, shipped). What it still lacks are the durable effects — deterministic
201-
local Git effects (#294), explicit `<Git.Push>` (#370), `<PullRequest>` (#295),
202-
and `<Issue>` (#296) — none of which is built. Together they cover the work that
203-
should not depend on model judgment:
200+
host (#293, shipped). The durable effects are there too: deterministic
201+
local Git effects (#294), explicit `<Git.Push>` (#495), and `<PullRequest>`
202+
(#295) are all registered by the workflow host. `<Issue>` (#296) is the one that
203+
is still not built. Together they cover the work that should not depend on model
204+
judgment:
204205

205206
- retain each handoff, plan, review, and decision as a filtered journal event
206207
bound to the Workspace root current when it was written;
@@ -214,9 +215,13 @@ should not depend on model judgment:
214215
- record the inputs, observed state, effects, and outputs of each operation.
215216

216217
Agent calls analyze evidence and propose changes; they do not perform them. Under
217-
a workflow run an Agent is read-only, and a proposal reaches the Workspace as
218-
generated XMD that a constrained evaluator preflights and expands as ordinary
219-
durable effects (#302, #369). Deterministic components apply approved
218+
a workflow run an Agent reaches no checkout at all, and a proposal reaches the
219+
Workspace as generated XMD that a constrained evaluator preflights completely
220+
and expands as ordinary durable effects. That evaluator is built for observation
221+
(#497) — pinned identities, exact request ceilings, one retained admission — and
222+
what is still owed is admission for a mutating fragment, the bounded
223+
request/result loop an Agent observes the repository through (#302), and the
224+
public component a document writes to reach either (#369). Deterministic components apply approved
220225
environmental changes and provide exact required content to the next call.
221226
Generated files are optional exports rather than the handoff protocol. This
222227
removes manual copying between agent-owned transcripts, plan files, and working

0 commit comments

Comments
 (0)