From 8c58f29ab521130b00187c5f96f80f7a70e89737 Mon Sep 17 00:00:00 2001 From: Yaacov Date: Fri, 20 Nov 2026 10:47:45 +0200 Subject: [PATCH 1/2] fix(scient): name Scient Agent to GitHub and correct the 19.0.1 receipt The Git view's GitHub avatar lookup sent `omp` as its User-Agent; the identity generator now names Scient Agent there (the next commit applies it). The twelfth intake's receipt said the RPC changes were additions only, but `handoff` no longer returns `savedPath`, and `bash.excludeFromContext` shipped in 0.1.13. It also said Desktop passes no Scient Agent variable but the root; it sets its page and source switches too. Release step 1 gave a blank run and 0.2.0 as examples, which the new check refuses for the first Oh My Pi 19 release: it is 1.0.0. Found by a Codex review of the changes made after its last recheck. Scient-Divergence: GEN-IDENTITY Co-Authored-By: Claude Opus 5.5 --- SCIENT.md | 8 ++++---- scripts/scient/rename-identity.ts | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/SCIENT.md b/SCIENT.md index 0945f5db83..ebaeeac3cf 100644 --- a/SCIENT.md +++ b/SCIENT.md @@ -1037,9 +1037,9 @@ Decisions: | `SA-WORKER` adapted | The launch tags it carried are gone with the workers' own processes. The daemon names its build by Oh My Pi's package version and the binary's file time, and a newer build has an older daemon re-exec into it, which stops the inference and prediction units. Two Scient Agent releases on one Oh My Pi release share that version, so their order came down to file times, and a reinstalled older release could look newer. The daemon's build now leads with Scient Agent's release (`daemon/build.ts`), and upstream's build test expects it. Retiring the contract was considered first and rejected for that case. | | `SA-PROMPT-CACHE` kept | 19.0.0's bridge compaction runs while a run is streaming and commits at a mid-run boundary; it reuses the background compaction Scient Desktop already shows. Desktop's idle compaction follows `cache_warming_stopped` after the run, so the two do not overlap. | | Daemon and Desktop's process reaping | Desktop stops what an agent's process tree left running when a thread stops. On macOS the daemon was seen with PID 1 as its parent and a session of its own while the agent that started it still ran, so it is not in that tree; the brokers it replaces were started the same way. | -| Not adopted | `SCIENT_AGENT_DAEMON_DIR` and `SCIENT_AGENT_DAEMON_TCP` can still point outside a host's root: Desktop passes no `SCIENT_AGENT_*` variable but the root, and a `.env` outside the root cannot set them, as for the broker overrides before. `mcp.evalNamespaces` (off by default) would move Scient's service catalog into eval namespaces; Desktop does not turn it on. The WebKit engine stays in `~/.o2/lib/abkit`, which upstream shares with Tern on purpose. | +| Not adopted | `SCIENT_AGENT_DAEMON_DIR` and `SCIENT_AGENT_DAEMON_TCP` can still point outside a host's root: Desktop drops every inherited `SCIENT_AGENT_*` variable and sets only the root and its own switches (`SCIENT_AGENT_HOST_PAGES`, `SCIENT_AGENT_ENABLE_SOURCES`), and a `.env` outside the root cannot set them, as for the broker overrides before. `mcp.evalNamespaces` (off by default) would move Scient's service catalog into eval namespaces; Desktop does not turn it on. The WebKit engine stays in `~/.o2/lib/abkit`, which upstream shares with Tern on purpose. | -**RPC changes for Desktop.** Protocol versions stay 1 and 2. Additions only: `cache_warming_start` and `cache_warming_end` carry `method` (`prewarm` or `replay`), bash takes `excludeFromContext`, and `handoff` now runs as background compaction (Desktop does not send it). **Desktop compatibility needs a Desktop change**: every shipped Desktop refused this build, because its Scient Agent target required the stock Oh My Pi provider's major, 18. [Scient Desktop #1034](https://github.com/ScientFactory/scient-desktop/pull/1034) gives Scient Agent its own upstream range (18.2.8 or newer on 18 or 19) and accepts product majors 0 and 1. This build is released as **1.0.0**: older Desktops stop below 1.0.0, so they keep 0.1.13 instead of installing a release they would refuse. The release check now enforces it (see Release). +**RPC changes for Desktop.** Protocol versions stay 1 and 2. `cache_warming_start` and `cache_warming_end` carry `method` (`prewarm` or `replay`). `handoff` now runs as background compaction and answers with empty data, without the `savedPath` it returned before; Desktop does not send it. **Desktop compatibility needs a Desktop change**: every shipped Desktop refused this build, because its Scient Agent target required the stock Oh My Pi provider's major, 18. [Scient Desktop #1034](https://github.com/ScientFactory/scient-desktop/pull/1034) gives Scient Agent its own upstream range (18.2.8 or newer on 18 or 19) and accepts product majors 0 and 1. This build is released as **1.0.0**: older Desktops stop below 1.0.0, so they keep 0.1.13 instead of installing a release they would refuse. The release check now enforces it (see Release). **Known failures.** A probe (branch `probe/pristine-1901`, [run 44643479068](https://github.com/ScientFactory/scient-agent/actions/runs/44643479068)) ran each bucket on untouched 19.0.1 and on the replay `7ca5ec2110`, on Scient's runner type, concurrency and per-test ceiling: `coding-agent-native` 8 times each, the other five twice each. Its logs were read test by test with `upstream-tests.ts`'s own judge. @@ -1069,7 +1069,7 @@ On macOS arm64 with Bun 1.4.4 and the repo-pinned November nightly: Not run locally: Rust tests and Oh My Pi's six buckets in full. CI builds and checks the six platforms and runs the six buckets. -Review: Codex reviewed the replay three times. The first review found the two new temporary folders shared with a stock `omp`, the TypeScript resolver's `omp` exemption, the usage-limit timeout dropping the provider's hint, and the file-time ordering that made `SA-WORKER` stay; all four were fixed. It also argued that the daemon directory and TCP overrides, the eval namespaces and the WebKit folder needed changes; the "Not adopted" row says why they did not. A Codex debate chose the 1.0.0 product major over a catalog contract revision for the Desktop gate. The second review found the Desktop resume and manifest gaps fixed in #1034, and the hint's time anchor, fixed; its recheck was clean but for the manifest's `updatedAt`, fixed. +Review: Codex reviewed the replay three times. The first review found the two new temporary folders shared with a stock `omp`, the TypeScript resolver's `omp` exemption, the usage-limit timeout dropping the provider's hint, and the file-time ordering that made `SA-WORKER` stay; all four were fixed. It also argued that the daemon directory and TCP overrides, the eval namespaces and the WebKit folder needed changes; the "Not adopted" row says why they did not. A Codex debate chose the 1.0.0 product major over a catalog contract revision for the Desktop gate. The second review found the Desktop resume and manifest gaps fixed in #1034, and the hint's time anchor, fixed; its recheck was clean but for the manifest's `updatedAt`, fixed. A third review, after the merge, covered the changes made after that recheck. It found the RPC and environment statements above overstated, and the release step's example out of date; all fixed. It also found the Git view's GitHub avatar lookup sending `omp` as its User-Agent, a leak since before this alignment, now `scient-agent` through the identity generator. It argued that a known failure should also match a failure signature; that was not taken: each entry is pinned to the exact upstream commit and was seen failing on untouched upstream, and a signature drawn from one to three observed failures would fail a run on the next flake that ends at another assertion. It argued that the relay quarantine's signature also matches a reattach that is really broken; that was not taken, as the unquarantined relay tests that re-adopt a tab Chrome detached take the same reattach path and would fail, and release runs ignore the quarantine. ### Recurring cadence @@ -1161,7 +1161,7 @@ The macOS builds are signed by upstream's `scripts/ci-macos-sign.sh`, unchanged, A release follows Scient Desktop's order: the version is the run's input, it is checked first, and the tag comes last. No pull request bumps a version. -1. Run the workflow manually on `main` with `release` set: `gh workflow run scient.yml --repo ScientFactory/scient-agent --ref main -f release=true`. Leave `version` blank to release the next patch after the latest published release, or give the next minor or major (`-f version=0.2.0`). A build on a new Oh My Pi major starts a new product major, released only once a Scient Desktop that accepts it is out: a Desktop installs nothing past its own ceiling, the next product major, so older Desktops keep the release they can run. The check maps them (`PRODUCT_MAJOR_BY_UPSTREAM_MAJOR` in `scripts/scient/release-version.ts`: Oh My Pi 18 is 0.x, 19 is 1.x) and refuses any other version, a blank run's next patch included. +1. Run the workflow manually on `main` with `release` set: `gh workflow run scient.yml --repo ScientFactory/scient-agent --ref main -f release=true`. Leave `version` blank to release the next patch after the latest published release, when that patch stays in the product major below, or give the next minor or major (`-f version=1.1.0`). The first release on Oh My Pi 19 is `-f version=1.0.0`. A build on a new Oh My Pi major starts a new product major, released only once a Scient Desktop that accepts it is out: a Desktop installs nothing past its own ceiling, the next product major, so older Desktops keep the release they can run. The check maps them (`PRODUCT_MAJOR_BY_UPSTREAM_MAJOR` in `scripts/scient/release-version.ts`: Oh My Pi 18 is 0.x, 19 is 1.x) and refuses any other version, a blank run's next patch included. 2. Its first job (`scripts/scient/release-version.ts`) refuses a version that does not come right after the latest published release, or that a tag carries already, before any build starts. Each build writes the version into its own checkout's `scient.json` (`--stamp`) and checks that the binary reports it. The run signs the macOS builds with the Developer ID, notarizes them and refuses an ad-hoc signature. Only when every job passed does it check the version again and draft a GitHub release with every binary, its zstd copy (`.zst`) and the SHA-256 of each, targeting the commit it built. 3. A person publishes the draft. Publishing creates the `v` tag on that commit; a draft has no tag. diff --git a/scripts/scient/rename-identity.ts b/scripts/scient/rename-identity.ts index 679c3df917..12e8ac838a 100644 --- a/scripts/scient/rename-identity.ts +++ b/scripts/scient/rename-identity.ts @@ -106,6 +106,8 @@ const NAMES: Record = { ['return value ? value : "omp";', `return value ? value : "${COMMAND}";`], ], // The User-Agent names the app (`APP_NAME/`); a test that reads it names it too. + // The Git view's GitHub avatar lookup names the app to GitHub. + "packages/coding-agent/src/cli/git-tui/avatar.ts": [['"User-Agent": "omp"', `"User-Agent": "${COMMAND}"`]], "packages/coding-agent/test/spotlight/wire.test.ts": [['toStartWith("omp/")', `toStartWith("${COMMAND}/")`]], "packages/coding-agent/src/cli/commands/init-xdg.ts": [ ['const APP_NAME = "omp";', `const APP_NAME = "${COMMAND}";`], From c38510dcfc6382b3c0ac7cde40f58fbb5e7bdd48 Mon Sep 17 00:00:00 2001 From: Yaacov Date: Fri, 20 Nov 2026 10:46:37 +0200 Subject: [PATCH 2/2] scient: regenerate identity for the Git view's User-Agent Scient-Generator: identity Co-Authored-By: Claude Opus 5.5 --- packages/coding-agent/src/cli/git-tui/avatar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/coding-agent/src/cli/git-tui/avatar.ts b/packages/coding-agent/src/cli/git-tui/avatar.ts index d80d467ac9..deb6fe62f2 100644 --- a/packages/coding-agent/src/cli/git-tui/avatar.ts +++ b/packages/coding-agent/src/cli/git-tui/avatar.ts @@ -47,7 +47,7 @@ async function githubApiAvatarUrl(cwd: string, email: string): Promise = { Accept: "application/vnd.github+json", "User-Agent": "omp" }; + const headers: Record = { Accept: "application/vnd.github+json", "User-Agent": "scient-agent" }; if (token) headers.Authorization = `Bearer ${token}`; try { const response = await fetch(