Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SCIENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 (`<binary>.zst`) and the SHA-256 of each, targeting the commit it built.
3. A person publishes the draft. Publishing creates the `v<version>` tag on that commit; a draft has no tag.

Expand Down
2 changes: 1 addition & 1 deletion packages/coding-agent/src/cli/git-tui/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function githubApiAvatarUrl(cwd: string, email: string): Promise<string |
const match = remoteUrl?.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?$/);
if (!match) return null;
const token = process.env.GITHUB_TOKEN ?? process.env.GH_TOKEN;
const headers: Record<string, string> = { Accept: "application/vnd.github+json", "User-Agent": "omp" };
const headers: Record<string, string> = { Accept: "application/vnd.github+json", "User-Agent": "scient-agent" };
if (token) headers.Authorization = `Bearer ${token}`;
try {
const response = await fetch(
Expand Down
2 changes: 2 additions & 0 deletions scripts/scient/rename-identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ const NAMES: Record<string, [from: string, to: string][]> = {
['return value ? value : "omp";', `return value ? value : "${COMMAND}";`],
],
// The User-Agent names the app (`APP_NAME/<version>`); 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}";`],
Expand Down
Loading