A CI wait reads the host the repository origin names, through A1 seam (martha#45 row A1) #156

Open
pluto wants to merge 2 commits from pluto/45-a1-wait-through-the-seam into main
Member

Purpose (feature): a wait_for_ci on a repository that lives on a declared host is read on that host, through A1's one adapter seam (martha#45 row A1, #46), so a member on a forge can wait on its CI instead of asking GitHub about a repository GitHub does not hold.

What changed. wait_for_ci read every repository through the crew's one GitHub budget (readTheRunsOn, readTheRun). It now asks ../read_the_ci_of_a_host for the adapter its repository's origin host is declared with, exactly as a HANDOFF's ci= does:

  • GitHub: the read is the budget's own, and every word of its answers is unchanged.
  • A declared host: the read is that host's adapter (runsOnTip; run by id), it spends nothing of the GitHub budget, and its reads are spaced by the crew's own record under the wait's key.
  • A host no declaration names, or a kind with no adapter: the seam's own words (no host kind is declared for <host>, no adapter for <kind>), never a read as GitHub.

The greens kept for a wait and its spacing are the crew's own store, so they hold whichever host wrote the run. The tools slice builds the seam once (theCiSeamOf, beside the tools' places, martha#999 package 2b's cap) and hands it to both the send and the wait.

Review r=1 (Mars, after a fable read), all in ee0b1189.

  1. A declared host's wait is spaced by its own key. The forge read wrote nothing to the budget's waits table, so the crew's own spacing stood in, which is no wait at all on a crew that has not read GitHub: each read was charged to the wait's twelve, a twenty minute run could never report its green, and a read that began no wait named a moment already past. afterAHostsRead now begins the key's own wait (a minute, doubling to five) and the read is honoured against it before the host is asked, spending none of the crew's GitHub count. The refusal is in the host's own terms (the wait on <name> may read <host> again at <time>), never the GitHub budget's.
  2. Blind tests closed. A run the host lists on another commit; a github.com clone through the seam, asserting GitHub's own read and URL; and a tool level wait through crewToolsOver on a declared host, so dropping the_owners_files or breaking theCiSeamOf now fails by name. wait_for_ci's own second tip filter is gone: every adapter filters before it answers, so no test could reach it, and the filter is pinned where it lives, in the adapter's own test. The filter that remains is killed by a mutant, the removed one was not.
  3. A run's green names its repository. theRunKey is <repo>:run-<id>, so a green kept for one repository's run 812 no longer answers another repository's 812 with no read. A commit's key still names no repository, because a commit's key is its content.
  • Nit: 'completed' beside ENDED removed.
  • Refused read: a wait the seam names no host for (no clone, no origin host, an undeclared host) is answered without being charged to the wait's reads, as a GitHub read the budget refuses never is.
  • Intended, and stated here as asked: with the seam present, a GitHub repository is read through its clone's origin, so a wait on a repository the crew has not cloned, or whose clone has no readable origin, answers the seam's no clone / no origin host instead of asking GitHub. The seam is fail closed by design (martha#46: a call is never routed to GitHub because the host is unknown) and there is no way to know a repository is GitHub's without its origin. It costs the wait no read.

Evidence (host00 had two to three crew job containers throughout, so each file ran on its own, nice -n 10, one at a time):

$ ./prove_the_relay_loads/run_the_tests_of_one_file.sh
    src/wait_for_ci/wait_for_ci.node-test.ts        pass 32  fail 0  skipped 0
    src/a_crews_tools/*.node-test.ts                pass 204 fail 0  skipped 0
    src/send_a_crew_message/*.node-test.ts          pass 71  fail 0  skipped 0
    src/read_the_ci_of_a_host/*.node-test.ts        pass 33  fail 0  skipped 0
$ npx tsc --noEmit                                        clean
$ npx eslint src/wait_for_ci/ src/spend_the_github_budget/ src/a_crews_tools/ --max-warnings=0   clean
$ npm run check:no-import-cycle        1117 sources, no loop of value imports
$ npm run check:restated-values        no literal restates a defined value
$ npm run check:private                nothing private

Five mutants, each killed by name: no host wait recorded (the spacing case); the adapter's tip filter dropped (the adapter's own "a run is on the tip" case and this PR's "a run the host lists on another commit"); the built in github.com answer disabled (the github.com case); theRunKey without the repository (the same numbered run case); theCiSeamOf forced undefined (the tool level case).

CI on the tip: ci=forgejo:3866,3867,3868,3869 (advisories, c4-model, ci, standalone), all success on ee0b1189; 30 jobs, 26 success, 4 skipped by design (the three container variants and nothing private). Nothing was re-run.

Not in this PR. The other host calls in #45's table keep their own rows; most cannot move until the seam carries what they read (the range check needs job names, and jobsOf answers a count).

Refs #45 (row A1), #46.

Purpose (feature): a `wait_for_ci` on a repository that lives on a declared host is read on that host, through A1's one adapter seam (martha#45 row A1, #46), so a member on a forge can wait on its CI instead of asking GitHub about a repository GitHub does not hold. **What changed.** `wait_for_ci` read every repository through the crew's one GitHub budget (`readTheRunsOn`, `readTheRun`). It now asks `../read_the_ci_of_a_host` for the adapter its repository's origin host is declared with, exactly as a HANDOFF's `ci=` does: - **GitHub**: the read is the budget's own, and every word of its answers is unchanged. - **A declared host**: the read is that host's adapter (`runsOnTip`; `run` by id), it spends nothing of the GitHub budget, and its reads are spaced by the crew's own record under the wait's key. - **A host no declaration names, or a kind with no adapter**: the seam's own words (`no host kind is declared for <host>`, `no adapter for <kind>`), never a read as GitHub. The greens kept for a wait and its spacing are the crew's own store, so they hold whichever host wrote the run. The tools slice builds the seam once (`theCiSeamOf`, beside the tools' places, martha#999 package 2b's cap) and hands it to both the send and the wait. **Review r=1 (Mars, after a fable read), all in `ee0b1189`.** 1. **A declared host's wait is spaced by its own key.** The forge read wrote nothing to the budget's waits table, so the crew's own spacing stood in, which is no wait at all on a crew that has not read GitHub: each read was charged to the wait's twelve, a twenty minute run could never report its green, and a read that began no wait named a moment already past. `afterAHostsRead` now begins the key's own wait (a minute, doubling to five) and the read is honoured against it before the host is asked, spending none of the crew's GitHub count. The refusal is in the host's own terms (`the wait on <name> may read <host> again at <time>`), never the GitHub budget's. 2. **Blind tests closed.** A run the host lists on another commit; a `github.com` clone through the seam, asserting GitHub's own read and URL; and a tool level wait through `crewToolsOver` on a declared host, so dropping `the_owners_files` or breaking `theCiSeamOf` now fails by name. `wait_for_ci`'s own second tip filter is gone: every adapter filters before it answers, so no test could reach it, and the filter is pinned where it lives, in the adapter's own test. The filter that remains is killed by a mutant, the removed one was not. 3. **A run's green names its repository.** `theRunKey` is `<repo>:run-<id>`, so a green kept for one repository's run 812 no longer answers another repository's 812 with no read. A commit's key still names no repository, because a commit's key is its content. - **Nit**: `'completed'` beside `ENDED` removed. - **Refused read**: a wait the seam names no host for (no clone, no origin host, an undeclared host) is answered without being charged to the wait's reads, as a GitHub read the budget refuses never is. - **Intended, and stated here as asked**: with the seam present, a GitHub repository is read through its clone's origin, so a wait on a repository the crew has not cloned, or whose clone has no readable origin, answers the seam's `no clone` / `no origin host` instead of asking GitHub. The seam is fail closed by design (martha#46: a call is never routed to GitHub because the host is unknown) and there is no way to know a repository is GitHub's without its origin. It costs the wait no read. **Evidence** (host00 had two to three crew job containers throughout, so each file ran on its own, `nice -n 10`, one at a time): ``` $ ./prove_the_relay_loads/run_the_tests_of_one_file.sh src/wait_for_ci/wait_for_ci.node-test.ts pass 32 fail 0 skipped 0 src/a_crews_tools/*.node-test.ts pass 204 fail 0 skipped 0 src/send_a_crew_message/*.node-test.ts pass 71 fail 0 skipped 0 src/read_the_ci_of_a_host/*.node-test.ts pass 33 fail 0 skipped 0 $ npx tsc --noEmit clean $ npx eslint src/wait_for_ci/ src/spend_the_github_budget/ src/a_crews_tools/ --max-warnings=0 clean $ npm run check:no-import-cycle 1117 sources, no loop of value imports $ npm run check:restated-values no literal restates a defined value $ npm run check:private nothing private ``` Five mutants, each killed by name: no host wait recorded (the spacing case); the adapter's tip filter dropped (the adapter's own "a run is on the tip" case and this PR's "a run the host lists on another commit"); the built in `github.com` answer disabled (the github.com case); `theRunKey` without the repository (the same numbered run case); `theCiSeamOf` forced undefined (the tool level case). CI on the tip: `ci=forgejo:3866,3867,3868,3869` (advisories, c4-model, ci, standalone), all success on `ee0b1189`; 30 jobs, 26 success, 4 skipped by design (the three container variants and `nothing private`). Nothing was re-run. **Not in this PR.** The other host calls in #45's table keep their own rows; most cannot move until the seam carries what they read (the range check needs job names, and `jobsOf` answers a count). Refs #45 (row A1), #46.
A CI wait reads the host the repository's origin names, through A1's seam (martha#45 row A1)
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 7s
CI / links resolve (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / structural floor (pull_request) Successful in 30s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 27s
CI / the engine drift check bites (pull_request) Successful in 31s
CI / the host drift check bites (pull_request) Successful in 1m8s
CI / the posted text check bites (pull_request) Successful in 15s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 16s
CI / workflows are valid (pull_request) Successful in 12s
CI / installer (pull_request) Successful in 2m9s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 35s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 57s
CI / every check runs in a job (pull_request) Successful in 16s
CI / every job has a timeout (pull_request) Successful in 14s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 32s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 16s
CI / gate coverage (pull_request) Successful in 16m44s
CI / the relay loads in the recorded host (pull_request) Successful in 14m44s
CI / the clean-install proof removes its container (pull_request) Successful in 16m9s
dependency advisories / node in . (pull_request) Successful in 12s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 12s
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
a0d38320ca
`wait_for_ci` read every repository through the crew's one GitHub budget, so a wait on a
repository whose origin is a declared host asked GitHub about a repository GitHub does not hold
and spent the crew's GitHub budget for it.

The wait now asks ../read_the_ci_of_a_host for the adapter its repository's origin host is
declared with, exactly as a HANDOFF's ci= does (martha#46): GitHub's read stays the budget's
own and every word of it is unchanged, a declared host's is that host's adapter and spends
nothing of the GitHub budget, and a host no declaration names, or one whose kind has no
adapter, is answered in the seam's own words and never read as GitHub. The greens kept for a
wait and its spacing are the crew's own store, so they hold for either host.

The tools slice builds the seam once (theCiSeamOf, beside its places) and hands it to both the
send and the wait, so the two choose their adapter the same way.

Tested: four cases on the wait's own file drive a declared Forgejo: a green read there with the
GitHub runner asserted never asked, a run still going read as running, a run by its id and one
its host does not hold, and an undeclared host marked in the seam's words. The mutant that
sends every wait back through the GitHub budget fails three of them by name.
A declared host's CI wait is spaced by its own key, and a run's green names its repository (martha#45 A1 r=1)
All checks were successful
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 14s
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 5s
CI / structural floor (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 30s
CI / the host drift check bites (pull_request) Successful in 1m29s
dependency advisories / node in . (pull_request) Successful in 11s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 3s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / the engine drift check bites (pull_request) Successful in 50s
CI / the posted text check bites (pull_request) Successful in 12s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 12s
CI / nothing private (pull_request) Has been skipped
CI / installer (pull_request) Successful in 2m24s
CI / the pictures change only with the version (pull_request) Successful in 22s
CI / no test the base passed goes missing (pull_request) Successful in 38s
CI / every check runs in a job (pull_request) Successful in 20s
CI / every job has a timeout (pull_request) Successful in 15s
CI / no literal restates a defined value (pull_request) Successful in 1m8s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 32s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 17s
CI / the relay loads in the recorded host (pull_request) Successful in 14m57s
CI / gate coverage (pull_request) Successful in 16m48s
CI / the clean-install proof removes its container (pull_request) Successful in 18m1s
ee0b1189ae
Review r=1 (Mars, after a fable read):

- A declared host's read recorded no wait, so the crew's own spacing stood in (no wait at all on a crew that has
  not read GitHub) and each read was charged to the wait's twelve: a twenty-minute run could never report its
  green, and a read that began no wait named a moment already past. afterAHostsRead begins the key's own wait and
  the read is honoured against it before the host is asked, spending none of the crew's GitHub count. The refusal
  is in the host's own words, not the GitHub budget's.
- theRunKey names the repository: a green kept for one repository's run 812 answered another repository's 812
  with no read. A commit's key still names no repository, because a commit's key is its content.
- The blind tests closed: a run the host lists on another commit, a github.com origin through the seam, and a
  tool-level wait through crewToolsOver on a declared host (dropping the_owners_files or breaking theCiSeamOf
  fails it). wait_for_ci's own second tip filter is gone: every adapter filters before it answers, so no test
  could reach it, and the filter is pinned where it lives, in the adapter's own test.
- A wait the seam names no host for is answered without being charged to the wait's reads.
- 'completed' beside ENDED removed.
All checks were successful
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 14s
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 5s
CI / structural floor (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 30s
CI / the host drift check bites (pull_request) Successful in 1m29s
dependency advisories / node in . (pull_request) Successful in 11s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 3s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / the engine drift check bites (pull_request) Successful in 50s
CI / the posted text check bites (pull_request) Successful in 12s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 12s
CI / nothing private (pull_request) Has been skipped
CI / installer (pull_request) Successful in 2m24s
CI / the pictures change only with the version (pull_request) Successful in 22s
CI / no test the base passed goes missing (pull_request) Successful in 38s
CI / every check runs in a job (pull_request) Successful in 20s
CI / every job has a timeout (pull_request) Successful in 15s
CI / no literal restates a defined value (pull_request) Successful in 1m8s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 32s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 17s
CI / the relay loads in the recorded host (pull_request) Successful in 14m57s
CI / gate coverage (pull_request) Successful in 16m48s
CI / the clean-install proof removes its container (pull_request) Successful in 18m1s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin pluto/45-a1-wait-through-the-seam:pluto/45-a1-wait-through-the-seam
git switch pluto/45-a1-wait-through-the-seam
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
martha-ai/martha!156
No description provided.