You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5c6e35f
Browse filesBrowse the repository at this point in the historyBrowse files
✨ Advance a branch a run already published, when the remote is behind it (#594)
* ✨ Advance a branch a run already published, when the remote is behind it
A workflow publishes one branch repeatedly: an iteration commits, pushes,
commits again and pushes again. The second push found the destination naming
another commit and refused it as a conflict, so a supervised loop could publish
its branch exactly once (#588).
A destination naming a commit that is anywhere in the ancestry of the one being
published is now a performable pre-state. The push itself is unchanged — the
same exact `<commit>:<destination>` refspec, which native Git applies only where
it fast-forwards, with no force, no lease, no upstream option and nothing local
rewritten. Equality still adopts, absence still performs, and anything else is
still a conflict.
The ancestry is proved inside the already-authenticated, contained object
source, out of the objects that source holds, by one local question with two
answers. Nothing is fetched to answer it, so an observed commit the source
cannot read is an ordinary conflict; a proof that reaches neither answer is a
boundary failure rather than a finding about the remote.
The retained pre-state gains a third closed shape carrying the predecessor and
`relation: "ancestor"`. The two existing shapes are written byte-for-byte as
they were, and a record pairing a decision with a pre-state that cannot support
it — a relation beside a proven absence, an unknown relation, an undeclared
member, an adoption carrying a relation, a performance over an unattested
predecessor — still fails closed.
`<PullRequest>` now scans the whole successful history rather than refusing at
the first older Push for the same branch: the record naming this iteration's
commit authorizes wherever it appears, an earlier publication decides only which
refusal an unauthorized pull request gets, and an unreadable relevant record
still wins.
* 🔁 Resume a run that published its branch more than once
Two structural corrections to the fast-forward Push, both established by
architecture review of 0bb738f.
A partial replay of `Push A -> commit B -> Push B` diverged. A Push names its
request from the checkout — the branch it is on, and the commit that branch
holds — and a replay asked that question after the run had moved on, so the
first Push reconstructed B and arrived at A's retained record holding the wrong
request. Repeated publication is what this feature is for, so such a run could
not be resumed at all.
Each completed Push is now reconstructed from the Workspace root its own journal
event was appended against — the association the run made when it wrote that
event, rather than the frontier the run reached. The historical root is
materialized inside a rollback-only savepoint, the checkout family is exported
from it, and everything the materialization wrote is discarded on success,
failure and cancellation alike: the current root, the retained roots, the
metadata and the journal are what they were, and the run stays at B. A position
with no retained successful Push is a live attempt and still names its request
from the current root.
Selecting a root only decides which question is asked. The request it produces
still has to be the one that position asked, so a reconstruction naming the
wrong moment refuses the replay rather than answering it.
Second, a commit is its own ancestor, and `parseGitPushRecord()` accepted
`performed` beside `{ remoteCommit: <the commit it published>, relation:
"ancestor" }`. Observing the destination at exactly this commit is what adoption
is, so that record describes a reconciliation the state machine cannot reach. An
attested predecessor is now valid only when it differs from the source.
* 🩹 Let the run's last publication of a branch decide, and diverge on purpose
Two CI failures, both consequences of the fast-forward change meeting evidence
that was written when a branch could only be published once.
`admitPushEvidence()` counted exact records, so a run that published this head
and then published past it authorized a pull request naming the head it had
already replaced. `pull-request-records.test.ts` says otherwise, and it is
right: what a pull request is decided against is where the sequence of
publications ended. Every relevant record is still read whole and in order — an
unreadable one earlier in the sequence still refuses — and the last one decides:
this head authorizes, another commit is conflicting, none at all is missing.
Tier WFF's refusing remote seeded `refs/heads/publish/1` at `main`'s commit,
which `<Git.Switch>` then started the branch from, so what the push observed was
its own ancestor and the run now succeeded where WFF11 needs a Git-host effect
that established nothing. The seed publishes a second line of history under a
name the run does not push to — so the clone carries the objects and the switch
does not start there — and the document moves the destination onto it after the
clone. The push then observes a commit its own branch does not contain, which is
the conflict the case was always describing.
The move is written between two `<Repository>` elements rather than inside one:
a command runs where the element is written, and the retained checkout is not a
host directory to run one in.
---------
Co-authored-by: Taras Mankovski <[email protected]>
Copy file name to clipboardExpand all lines: architecture.md
+35-3Lines changed: 35 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1143,7 +1143,27 @@ path, so a completed replay reaches no provider and performs no such proof. A
1143
1143
graph that leaves what the run authenticated is a boundary failure: it publishes
1144
1144
no outcome, repeats no authored path, and activates fail-stop. It is rejected
1145
1145
rather than repaired, because editing authored state to make it acceptable would
1146
-
publish from state the run wrote on the author's behalf. The Workspace transaction such an effect opens is read-only and is
1146
+
publish from state the run wrote on the author's behalf.
1147
+
1148
+
That same contained source is what decides whether a branch may advance. A
1149
+
destination naming another commit is not by itself somebody else's work: a
1150
+
supervised run publishes one branch repeatedly, and the ordinary case is a
1151
+
remote tip the commit being published was built on top of. So ancestry is proved
1152
+
where the objects already are — inside the authenticated source, out of the
1153
+
commits it already holds, by one local question whose only answers are ancestry
1154
+
and divergence. A proven ancestor other than the commit being published is a
1155
+
performable pre-state, published over by the same exact non-force refspec a
1156
+
proven absence gets; an equal destination is adopted with nothing performed, and
1157
+
is never an attested advance, because a commit is its own ancestor and observing
1158
+
the destination at exactly this commit is what adoption is; and compatibility
1159
+
that was not proved — a divergent commit, or one the source does not hold — is a
1160
+
conflict. Nothing is
1161
+
fetched to prove it, because an object retrieved to answer the question would be
1162
+
evidence the question created, and a proof that reaches neither of its two
1163
+
answers is infrastructure rather than a finding about the remote. The relation,
1164
+
not the traversal that found it, is what the record keeps.
1165
+
1166
+
The Workspace transaction such an effect opens is read-only and is
1147
1167
closed before the host is observed: no transaction is claimed across the
1148
1168
Workspace and the external service, and reconciliation rather than a distributed
1149
1169
transaction is what makes an interrupted attempt reach the host once.
@@ -1300,6 +1320,18 @@ its authority is this run's own matching Push evidence, which no configuration
1300
1320
grants or withdraws. "Authority ceiling" remains the word for the bound; what an
1301
1321
operator writes is the list of places this host is allowed to reach.
1302
1322
1323
+
A replayed effect that has to name what it asked for reads the moment it asked
1324
+
from. A Push names its request out of the checkout, and a run that publishes one
1325
+
branch repeatedly has moved the Workspace on by the time it is resumed — so each
1326
+
completed Push is reconstructed from the root its own journal event was appended
1327
+
against, which is the association the run made when it wrote that event, rather
1328
+
than from the frontier the run reached. That reconstruction is a read: the
1329
+
historical root is materialized, exported from, and discarded on every path out,
1330
+
leaving the current root, the retained roots, the metadata and the journal
1331
+
exactly as they were. It decides only which question is asked, because the
1332
+
request it produces still has to be the one that position asked before the
1333
+
retained record answers it.
1334
+
1303
1335
An external effect is judged by its retained record rather than by its type. A
1304
1336
completed Git-host reconciliation record replays without contacting a provider,
1305
1337
so a fork inherits it and the remote is mutated once; the record keeps the
@@ -3131,8 +3163,8 @@ Status is measured against main.
3131
3163
| implicit workflow Workspace | retains provider-neutral filesystem, repository and attachment state by run ID | document filesystem built on the #366 stack and Repository/Worktree composition on the #293 stack; process capabilities unbuilt (#218) |
3132
3164
|`<Repository>` / `<Worktree>` / `<Dir>` composition | names a Git repository and its linked checkouts inside the run-owned Workspace, installs each as contextual working directory, and retains creation identity beside the retained Git bytes | built on the #293 stack, Deno provider only |
3133
3165
| transactional Git effects (`Git.Switch` / `Git.Add` / `Git.Commit`) | publish local Git mutations with their journal result; the enclosing Repository and the contextual working directory select which retained checkout one runs in, and neither observation carries authority — the observed record is compared with the retained row and the directory with the checkouts that row holds, so a failure of authority, of retained state or of an unrecognized native condition fails the run instead of publishing a result | built on the #294 stack, Deno provider only |
3134
-
|`Git.Push`| publishes the selected checkout's exact current named branch and commit to the same branch on the retained Repository's canonical `origin`, reconciled through the shared Git-host state machine rather than through a Workspace transaction: no props and no component result, no force, no upstream mutation and no implicit staging or committing; the durable request and record carry the Repository's filtered identity without its checkout path, and the transport runs in a provider-owned isolated control repository reading the checkout's objects through an object-source attachment whose alternates chain and object tree are proven contained before the first remote observation, aimed at the exact private retained locator | built on the #370 stack, Deno provider only |
3135
-
| `<PullRequest>` | upserts one pull request of the selected checkout's current named branch, reconciled through the shared Git-host state machine: a required `title`, an optional positive-integer `number`, an optional `base` defaulting to the Repository's retained initial branch, an optional `draft`, and the rendered content as the body; it renders nothing and returns stable evidence through `as` — the filtered Repository identity, the provider's own stable pull-request identity, number, URL, open state, and the head and base SHAs of the snapshot it finished at. Without a number it creates one pull request for the head/base pair or adopts the compatible one an interrupted attempt left; with a number it brings that exact pull request's title, body, draft state and base to what the request says, records a no-op when they already match, and refuses a number belonging to another repository, opened from another head, or no longer open. It never pushes, never rewrites a head, and never reopens, merges or comments. The run must already hold its own successful `Git.Push` result for that exact Repository identity, head branch, destination ref and commit — proven by a scan that requires the record's natural key, inputs and result to describe one publication — and a missing, conflicting or unreadable one fails locally before the Git host is observed; the first adapter works over `github.com` on REST plus the two GraphQL draft transitions, selected from the private retained locator, credentialed from `GH_TOKEN`, then `GITHUB_TOKEN`, then the machine's own `gh` login, issuing each required mutation at most once per attempt and deciding the outcome by one observation, with the locator, endpoint, credential and payload confined to the per-invocation provider closure | built on the #295 stack, Deno provider only |
3166
+
| `Git.Push` | publishes the selected checkout's exact current named branch and commit to the same branch on the retained Repository's canonical `origin`, reconciled through the shared Git-host state machine rather than through a Workspace transaction: no props and no component result, no force, no upstream mutation and no implicit staging or committing; the durable request and record carry the Repository's filtered identity without its checkout path, and the transport runs in a provider-owned isolated control repository reading the checkout's objects through an object-source attachment whose alternates chain and object tree are proven contained before the first remote observation, aimed at the exact private retained locator. A destination proven absent is published to once and one already naming this exact commit is adopted; one naming a distinct commit that same authenticated source proves is in this commit's ancestry is a performable pre-state, published over by the same exact non-force refspec and retained as the predecessor with the attested relation, while a divergent commit and one the source cannot read are both conflicts and nothing is fetched to decide either; a completed Push is reconstructed from the Workspace root its own journal event was appended against, read without publishing it or moving the run's frontier, so a branch published more than once resumes | built on the #370 stack, Deno provider only |
3167
+
| `<PullRequest>` | upserts one pull request of the selected checkout's current named branch, reconciled through the shared Git-host state machine: a required `title`, an optional positive-integer `number`, an optional `base` defaulting to the Repository's retained initial branch, an optional `draft`, and the rendered content as the body; it renders nothing and returns stable evidence through `as` — the filtered Repository identity, the provider's own stable pull-request identity, number, URL, open state, and the head and base SHAs of the snapshot it finished at. Without a number it creates one pull request for the head/base pair or adopts the compatible one an interrupted attempt left; with a number it brings that exact pull request's title, body, draft state and base to what the request says, records a no-op when they already match, and refuses a number belonging to another repository, opened from another head, or no longer open. It never pushes, never rewrites a head, and never reopens, merges or comments. The run must already hold its own successful `Git.Push` result for that exact Repository identity, head branch, destination ref and commit — proven by a scan of the whole successful history that requires each relevant record's natural key, inputs and result to describe one publication; a branch is published repeatedly, so the whole history is read in order and the run's last publication of that branch decides — an earlier one behind it is history rather than disagreement, while a last one naming another commit is the branch having moved on; that is conflicting, no relevant record at all is missing, and a relevant record that cannot be read whole is unreadable, each failing locally before the Git host is observed; the first adapter works over `github.com` on REST plus the two GraphQL draft transitions, selected from the private retained locator, credentialed from `GH_TOKEN`, then `GITHUB_TOKEN`, then the machine's own `gh` login, issuing each required mutation at most once per attempt and deciding the outcome by one observation, with the locator, endpoint, credential and payload confined to the per-invocation provider closure | built on the #295 stack, Deno provider only |
3136
3168
| `<Issue>` | asks one of two questions, decided by its own shape, through a boundary of its own rather than the Git host's. Self-closing with `url` reads that issue and binds `{ url, title, description, tags, assignee }`; paired with `title` upserts and binds exactly `{ url }`, its rendered content being the description. There is no `description` prop. Props are exactly `url`, `title`, optional `tags`, optional `assignee` and — on a read only — optional `provider`; no repository/token/label/milestone/project/comment/close or approval prop. Both forms render nothing. The form is decided before the tracker is read, before any provider is asked and before an `issue_effect` record exists, and that is where a mixed `url`+`title`, a read carrying content or `tags`/`assignee`, an upsert with no content, an upsert naming a `provider`, and an element that is neither are all refused. A read needs no tracker — its URL is the identity; an upsert requires the nearest lexical `<IssueTracker>` and takes its discriminator only from there. The tracker carries a credential-free `url` and an optional `provider`; the URL is canonicalized — a credential, a query and a fragment are refused rather than stripped — and a nested tracker replaces the whole value for its descendants, never merging members, with the enclosing one restored on leaving. It is composition data, not authority: the provider holds an adapter-private ceiling beside its credentials, admitted before it connects, so a target outside it sends nothing. One stable contextual operation, `executablemd.workflow.issue`, with `read(url, options)` and `upsert(issue, options)`; a provider is ordinary middleware around it, matching its own URLs without a discriminator and only its own name with one, independently per member, with no host-side resolution. Once middleware matches it owns the answer — it never delegates afterwards, and nothing catches its refusal to try somebody else — and a request everyone delegated reaches `NoIssueProvider` unchanged. `issue_effect` records an operation discriminator with the normalized request and result; both forms replay without reaching `IssueApi` and therefore without network access; only an upsert derives an idempotency key, from the operation, the canonical target and the run's own effect identity. Retention excludes credentials, endpoints, payloads, provider identities, origin markers and host paths. Observing, adopting, creating once and recovering an interrupted creation are the provider's, because they are knowledge about what a service can prove; title is never identity, and tags are a code-point-sorted set. The Deno workflow host installs configured GitHub middleware and installs none otherwise, so absence of configuration is fail-closed | built on the #296 stack; GitHub middleware, Deno host |
3137
3169
| workflow lifecycle inspection and control | reads status/list/history without advancing a run, recovering a private copy when a crashed source needs rollback; enforces the executor lock, refuses live cancellation, cancels non-live runs under that lock and deletes retained state | direct read-only inspection and control built on the #367 stack; coordinated recovered inspection built on the #513 stack, Deno provider only |
3138
3170
| historical authored source | retains an authored durable operation's normalized `SourcePosition` beside its identity, and history parses it or refuses the entry | built on the #367 stack |
0 commit comments