Skip to content

Commit 6b8361d

Browse files
sahrizviclaude
andauthored
release: v0.10.0 (#1232)
* release: v0.10.0 Add the `CHANGELOG.md` entry for `v0.10.0`, covering the 16 commits since `v0.9.7`: the workspace surface (skill sync, derived MCP engine overlay, warehouse tool routing, engine install offer), harness reliability, and the corrected ChatGPT-subscription model allowlist. The entry has to land before the tag — `script/build.ts` embeds `CHANGELOG.md` in the compiled binary and `script/publish.ts` copies it into every npm package, so tagging without it ships an artifact whose embedded changelog stops at the previous version. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(build): stop publishing the orphaned sourcemaps in platform packages `Bun.build` compiles with `sourcemap: "external"`, so it writes `index.js.map` (66MB) and `worker.js.map` (50MB) next to the binary. The bundles those maps describe are compiled INTO the single-file executable, so the published package carried `.map` files with no `.js` companion — unusable by any consumer that follows `sourceMappingURL`, and not read by the binary at runtime (verified: it runs, prints `--help` and reports errors normally with them deleted). They cost 20MB of a 191MB tarball, against npm's ~200MB E413 ceiling and the release gate's 190MB threshold — which this release tripped at 191MB. Adding a `files` allowlist to the generated platform `package.json` takes the tarball to 171MB compressed / 463MB unpacked, with both `bin/altimate` and `bin/altimate-code` still shipped (verified with `npm pack --dry-run`). They are still emitted, so debugging `dist/` locally is unchanged; they are just no longer published. Co-Authored-By: Claude Opus 5 <[email protected]> * fix: close the v0.10.0 release review findings Five-persona release review returned 4 SHIP WITH NOTES and 1 HOLD. This closes every P0 and the actionable P1s; the rest are recorded in `.github/meta/release-v0.10.0-findings.md` as deferred. **Skill listing injection (P0, the HOLD).** Three sites render an `<available_skills>` block from skill `name`/`description`. Two were escaped when skill sync landed; `tool/skill.ts` was missed — and it is the Skill tool's own description, sent to the model every turn whether or not the tool is ever invoked, so it is a wider exposure than either site that was fixed. Since skill frontmatter is now REMOTE content, a synced description ending `</description></skill></available_skills>` broke out and arrived as prompt text. `neutralizeListingWrapper` is now exported and both live sites route through it, so they cannot drift apart again. Its tag list also covers `system-reminder` and `auto_loaded_skill`: the harness uses both as trust boundaries in the same message stream, and remote text must not forge either. **Empty workspace never purged (P1).** `parsePage` rejected `pages < 1` as malformed, but the server sends `pages: 0` for an empty workspace — verified live: `{"items":[],"total":0,"page":1,"size":50,"pages":0}`. Zero skills was therefore unobservable and the `remote.length === 0` purge was unreachable, so a skill detached in the SaaS stayed on disk indefinitely. `pages: 0` is now accepted only when the envelope agrees it is empty; alongside rows it is still refused. The suite had locked the bug in by listing `0` among malformed values and asserting it must not purge. **Jira keys on a public repo (P1).** #1096 added three `AI-####` references to tracked files. Replaced with the public PR number. `script/check-tracker-leaks.ts` existed with its own tests but was wired into no workflow, which is why they landed — it now runs on every PR. Tests: `test/skill/release-v0.10.0-adversarial.test.ts` (7) pins the listing escape against break-out, opening-tag forgery, trust-tag forgery, case variants, over-escaping, and idempotence; two cases cover the real empty envelope. Both new assertions were mutation-tested — reverting each fix fails exactly the test written for it. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(skill): delete the duplicate listing renderer, and the bug it was hiding `src/skill/skill.ts` carried a second `<available_skills>` renderer that no production code called — `session/system.ts` and `tool/skill.ts` both use the one in `skill/index.ts`. Only `test/skill/fmt.test.ts` referenced it, so the suite was exercising the dead copy while the live renderer had no coverage at all. Deleted rather than kept in sync: two renderers is exactly how the wrapper-tag escaping came to be applied to one and not the other. Repointing those tests at the live renderer immediately failed, which is the point of doing it: **built-in skills rendered a location that does not exist.** A built-in skill's `location` is a `builtin:` URI, not a filesystem path, so `pathToFileURL` resolved it against the CWD and emitted `file:///…/packages/opencode/builtin:my-skill/SKILL.md`. The deleted duplicate had a guard for this; the live renderer never did. 21 built-in skills ship, so every session put 21 bogus paths in front of the model. Also in this round: - A test for the `MAX_TOTAL_BYTES` half of the sync ceiling, which had none. The first version was vacuous — mutation showed it passed against a ceiling with the byte term deleted, because the integrity check refuses the bundle anyway when it advertises 16MB and serves one byte. It now asserts the ceiling's real contract: the refusal happens on the ADVERTISED inventory, so no file is ever requested. Re-mutated to confirm it now fails. - `mcp status`, `--integrations` and `ALTIMATE_WORKSPACE` / `ALTIMATE_INTEGRATIONS` were shipped but undocumented; added to the command, flag and env-var tables. - "Unlink the project, or run without ALTIMATE_WORKSPACE" (5 sites) did not say whether that meant a per-session flag or a persistent variable, or whether a restart was needed. It is read at startup, so it now says "restart with ALTIMATE_WORKSPACE unset". Co-Authored-By: Claude Opus 5 <[email protected]> * fix: single-source the safety fraction, strip control chars from stderr notices Two small review findings. `compaction.ts` declared its own bare `0.65` for the context safety fraction, cross-referenced to the `DEFAULT_SAFETY_FRACTION` exported by `tool-result-cap.ts` by comment only. The two had already drifted apart once; a comment cannot hold them equal, so the compaction copy now imports the exported value. No cycle: `tool-result-cap.ts` imports nothing from `session/`. `engine-probes.ts`'s `printLine` wrote workspace-derived text straight to stderr. The workspace NAME is set server-side and never validated for control characters, so a name carrying ANSI escapes could repaint or hide surrounding output — including, in a CI log, the "engine not usable" notice this function exists to deliver. C0 and DEL are now stripped; the newline is added by the writer, so nothing legitimate needed them. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(ci): drop the invalid `--depth=0` from the tracker-leak job's fetch The job I added in this PR failed before it could run its own check: git fetch origin main --depth=0 fatal: depth 0 is not a positive number `--depth=0` is not valid git. `actions/checkout` already runs with `fetch-depth: 0` in this job, so the clone is complete and a plain fetch of the base ref is all the guard needs to diff against. Verified locally: `bun script/check-tracker-leaks.ts` against `origin/main` exits 0 on this branch, so the job should now run and pass rather than error out during setup. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): close the consensus-review findings — 4 major, 7 minor, 2 nit Nearly every finding was one shape: a correct fix applied at one site and not its sibling — the exact class this PR exists to close. **M2 — the `builtin:` guard was applied to one of two live renderers.** I fixed `skill/index.ts` and left `tool/skill.ts` interpolating `pathToFileURL` raw. By this PR's own argument that is the WORSE site: it is the Skill tool's description, sent every turn whether or not the tool is invoked. So "21 built-in skills put bogus paths in front of the model" stayed true for the every-turn listing. Both now share an exported `formatSkillLocation`. **M3 — the neutralizer was bypassed by whitespace.** `<(\/?)(tag)` matched `</description>` but not `</ description>`, `< /description>` or `< system-reminder>`. The consumer is a language model, not an XML parser, so those may still read as boundaries. Now a lookahead permitting whitespace, which also leaves the surrounding text byte-for-byte intact. The test asserting "case and whitespace variants do not slip through" contained four case variants and no whitespace variant — the name claimed coverage it did not provide, which is how the gap stayed invisible. Split into two honestly-named tests. **M4 — the tests pinned the helper, not the routing.** Every test called `neutralizeListingWrapper` directly, so reverting `tool/skill.ts` to raw interpolation left them all passing — which is precisely how M2 survived. Extracted `renderAvailableSkills` so the tool's listing is reachable, and both live sites are now driven with identical hostile-metadata and `builtin:` assertions. Mutation-verified in both directions: reverting the escaping fails one test, removing the location guard fails the other. **M1** was already fixed in the previous commit (`--depth=0` is not valid git). Minors: an absent or non-numeric `total` no longer authorises a purge (m1 — a malformed 200 could delete the snapshot AND be recorded as a successful poll); the body escaper now shares the listing's trust-tag list, so a synced body cannot forge a `<system-reminder>` (m2); `fmt`'s non-verbose branch is escaped (m3); `skill.name` is escaped in the `<skill_content>` attribute (m4); `printLine` strips BEFORE the test seam, which previously left the override exit unsanitised entirely (m5); the CI guard gets `github.head_ref` so its branch-name scan is not inert in a detached-HEAD checkout (m6); the dead `pathToFileURL` import is gone and the comment no longer claims a consolidation that did not happen (m7). Nits: `stripControl` keeps TAB and now covers C1 (U+009B is CSI, which the C0-only range let through) (n1); recorded why `location` is in the tag list but not routed through the neutralizer — `pathToFileURL` percent-encodes `<`/`>` (n2). Also fixes a marker-integrity break of my own: `engine-probes.ts` had 2 `altimate_change start` against 1 `end`. `analyze.ts --markers` did not catch it because that check covers only upstream-shared files; the real check lives in `test/upstream` and `test/branding`, which CI runs and I had not. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): mark the non-verbose fmt escaping for the upstream-shared marker guard The marker guard diffs committed state against origin/main, so the escaping added to `fmt`'s non-verbose branch needed its own altimate_change markers in a commit before the check could see them. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): two regressions the bot reviewers caught in my own review fixes **The widened body escaper corrupted shipped skills.** Sharing the listing's tag list with `neutralizeSkillWrapper` meant skill BODIES had their structural tags escaped too — and `.opencode/skills/` ships **117** legitimate `<name>` occurrences across dbt-docs, dbt-develop and sql-review. Every auto-loaded builtin skill would have had them rewritten to `&lt;name>`. In a listing those tags are structure; in a body they are content. Narrowed back to the two actual trust boundaries, `auto_loaded_skill` and `system-reminder`, which is what that escaper is for. **`PR_BRANCH` did nothing.** I added the env var to the workflow so the guard's branch-name scan would work in a detached-HEAD PR checkout, but never taught `check-tracker-leaks.ts` to read it — its only `process.env` reference was `SKIP_TRACKER_CHECK`. The scan stayed inert, which is exactly the gap the change claimed to close. The script now prefers `PR_BRANCH`; verified by running it with a tracker-shaped branch name, which now exits 1 where it previously passed. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): close the remaining bot-review findings Several are the same one-site-not-its-sibling shape this release keeps tripping over — including two where I fixed a line and missed its neighbour. - `# Skill: ${skill.name}` sat one line below the `<skill_content>` attribute I had just escaped, still interpolating the same attacker-influenced frontmatter raw. So did the `examples` hint that seeds the tool description. Both now escape. - Attribute escaping handled `"` but not `&`, so a name containing the literal text `&quot;` survived and the consumer decoded it back into a real quote that closes the attribute — the exact break-out the escaping exists to stop. Extracted `escapeSkillAttr`, which escapes `&` first. - `<built-in>`, the sentinel location for embedded skills, is no more a filesystem path than `builtin:` is; it was still being run through `pathToFileURL` into a URL that does not exist. - An empty page with a negative or NaN `total` still authorised the purge; the gate now requires an integer zero. - `pages: 0` arriving on a LATER page contradicts the page count page 1 gave. Accepting it made `listAll` stop early and return a PARTIAL list as though it were the whole workspace, pruning everything past page 1. Restricted to the first page. - The tracker-leak job now runs with `permissions: contents: read` and `persist-credentials: false`: it executes pull-request code and should not have a token sitting in `.git/config`. - `--integrations` sets a process-wide env var that children inherit; the docs said "for this session". - `mcp status` moved out of "Added" — this release documented it, it did not add it. - Refreshed the adversarial test header, which still described the duplicate `Skill.fmt` that this release deleted. Tests cover the `&`-before-`"` ordering, both location sentinels, and the later-page `pages: 0` case. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): second bot round — a vacuous test of mine, and three real gaps **The `pages: 0` later-page test could not fail.** Its only skill sat on page 1, so the buggy partial list still contained it and the assertion passed with or without the guard. The at-risk skill now lives on page 2, which is the only place the regression is observable. Mutation-verified: removing the `expectedPage !== 1` guard now fails it. That is the third vacuous test I have written this release; the test carries a note saying so. **The escaped `examples` hint broke lookup.** The model copies that hint verbatim as the `name` argument, so entity-escaping it advertised a name that would never match a real skill. It now strips angle brackets instead, which keeps the injection surface closed without inventing an unusable name — the authoritative listing is escaped either way. **`stripControl` let U+2028/U+2029 through.** Neither is C0 or C1, but both are Unicode line separators and still break the one-notice-per-line framing that writer depends on. **Restored the `#1160` reference** dropped when `mcp status` was folded from Added into the MCP-diagnostics entry. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): the examples hint must be copyable, not sanitised The previous attempt at this line was wrong twice over, as the bot review pointed out: - Its justification was inaccurate. `isSkillFrontmatter` only requires `typeof data.name === "string"`, so a synced skill's name CAN contain `<`/`>`. - `replace(/[<>]/g, "")` therefore overcorrected: `foo <bar>` rendered as `foobar`, which no longer matches on `Skill.get` — reintroducing, for every legitimately bracketed name, the exact lookup mismatch the change was meant to fix. The hint is copied verbatim by the model as the `name` argument, so it has to match the real skill. That rules out escaping it and rules out stripping. It now advertises only names the neutralizer would leave untouched — precisely the set that is both copyable and free of trust-tag text. Every skill still appears in the authoritative listing above, escaped. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): close the human review — 1 critical, 2 major, 1 minor **CRITICAL — the rendered skill BODY was completely unescaped.** `skill.name` was escaped on the two lines above it and `skill.content.trim()` went out raw, as did each `<file>` path. For a workspace-synced bundle that body is remote content, so it could close `</skill_content>` and continue as post-skill tool output, or forge a `<system-reminder>` verbatim — the exact forgery `neutralizeSkillWrapper` was extended to stop on the auto-load path. This path is the WIDER of the two: the auto-load path needs `alwaysApply` or a matching glob, this one is what any skill reaches on demand. `neutralizeListingWrapper` could not be reused: its `skill\b` alternative does not match `skill_content`, because `\b` fails between the `l` and the `_`. So the body gets its own tag set — `skill_content`, `skill_files`, `file`, `auto_loaded_skill`, `system-reminder` — via `neutralizeBodyWrapper`, applied to the body and to every bundle file path (`safeRelativePath` rejects `..`, absolute paths and NUL, but permits `<` and `>`). **MAJOR — `<built-in>` made the built-in skill scan the user's project.** `isBuiltin` tested only `startsWith("builtin:")`, so for the `customize-opencode` skill registered with `location: "<built-in>"`, `path.dirname()` returned `"."` and `Ripgrep.files({ cwd: "." })` ran over the whole project, emitting up to ten of the user's file paths inside `<skill_files>` for a skill that has no files. Third site of this same fix, so it now goes through one predicate: `classifySkillSource`, which also learned `<built-in>`. **MAJOR — `parsePage` was one-directional.** The guards rejected `pages: 0` unless the envelope agreed it was empty, but not `total: 0` with `pages > 1`. A `{items: [], total: 0, pages: 3}` envelope was accepted, `listAll` returned `[]`, and the snapshot was purged on a malformed 200 — the one outcome this parser's own comment says it exists to prevent. Now symmetric. Tests: body break-out, forged `system-reminder`, the `skill_content` underscore case (asserting the listing pattern genuinely does not cover it), file-path forgery, an over-escaping guard, both location sentinels, and the mirror `total: 0` / `pages > 1` envelope. Every new guard mutation-verified — the symmetric one initially had NO covering test and the mutant survived, so the mirror test was added and re-checked. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(build): use `!bin/**/*.map` so the exclusion descends `*` does not descend, so a sourcemap emitted under `bin/<subdir>/` would still have shipped despite the exclusion added earlier in this PR. Also records the tradeoff the allowlist introduces: any future artifact added outside `bin/` is now silently dropped from the published package. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): third bot round — a regression of mine, plus a live break-out **`isBuiltin` suppressed real skill directories (P1, my regression).** Routing it through `classifySkillSource` was wrong: that answers "who shipped this" and returns "builtin" for skills that DO live on disk (`~/.altimate/builtin`, Altimate-owned `node_modules`). Their resource directories were suppressed and their bundled files omitted, breaking relative references. The question here is "does this have a filesystem directory", which only the two sentinels answer — now `Skill.hasNoSkillDirectory`, shared with `formatSkillLocation` since both ask the same thing and drifted apart once already. **One neutralizer implementation, several tag sets (P2).** `makeWrapperNeutralizer` now backs the listing escaper, the body escaper and `system.ts`'s auto-load escaper. Adding a trust boundary means adding it to a list rather than remembering to patch a third regex — which is how the body escaper shipped without `system-reminder`. The sets stay separate deliberately: the listing's structural tags must not be escaped inside a body, where `.opencode/skills/` ships 117 legitimate `<name>` occurrences. Patterns are built once per set rather than per call. **The body render site is now testable, and testing it found a live bug (P3).** The previous tests pinned `neutralizeBodyWrapper` but not the site that calls it — the same gap that let the critical through, so `renderSkillContent` is extracted the way `renderAvailableSkills` was. The new render-site test failed immediately: a hostile skill NAME ending `</skill_content>` broke out of the block, because the heading used the LISTING neutralizer and its `skill\b` alternative does not match `skill_content`. The heading now runs through both sets. Mutation-verified: removing the body escaping from the render site fails the new test. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): pin the call sites, split the file tag set, refuse any empty later page **Call sites, not helpers — the third time this was raised, and it was right each time.** Asserting `hasNoSkillDirectory("<built-in>")` stays true even if the site stops calling it, which is exactly how the previous regression there went unpinned; the same held for the `<file>` escaping. `resolveSkillBase` and `renderSkillFileEntry` are now extracted and driven directly by tests. All three fixes in this commit are mutation-verified: reverting the `<file>` escaping, reverting `isBuiltin` to the classifier, or dropping the empty-page guard each fails a test. **`file` no longer escapes prose.** `neutralizeBodyWrapper` ran over both the body and the generated `<file>` entries, so it had to satisfy both — but in a body `<file>` is ordinary documentation (`cat <file>`, or any Maven / log4j / `.csproj` snippet). That is the same over-correction that kept `name` out of the body set. `file` moves to `FILE_PATH_BOUNDARY_TAGS`, used only for the generated path entries. No shipped `SKILL.md` contains any of the five tags today, so this was latent rather than live. **Any empty page after page 1 is refused, whatever `pages` claims.** The previous guard only caught `pages: 0`. `{items: [], total: 0, page: 2, pages: 1}` slipped through: `listAll` stopped on `page >= pages` and returned only page 1's rows as though they were the whole workspace, pruning everything on later pages. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): require a real tag delimiter, plus two tidy-ups **`\b` also sits before `-`,** so `<name-value>`, `<file-path>` and `<description-list>` were escaped as though they were wrapper tags. The pattern now requires a real delimiter after the tag name — `\s*(?:[/>]|$)` — which keeps legitimate hyphenated markup intact while still catching `<name>`, `</ name >` and the genuinely hyphenated `<system-reminder>`. Mutation-verified: restoring `\b` fails the new cases. Also: aligned the `resolveSkillBase` call to its enclosing block, and merged the duplicate `../../src/tool/skill` import in the adversarial test. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): whitespace terminates a tag — restore attribute-bearing escaping The previous commit's comment said `[\s/>]` and its code said `\s*(?:[/>]|$)`. Those are not the same: the first accepts whitespace as a TERMINATOR, the second SKIPS whitespace and then demands `/`, `>` or end-of-input. So every attribute-bearing wrapper tag stopped matching — including the exact forms this codebase emits, `<skill_content name="...">` and `<auto_loaded_skill name="...">`. Remote skill text could forge either verbatim. That regressed the critical finding this PR exists to close, one commit after closing it. Root cause of it going unnoticed: every hostile fixture in the suite used a BARE tag (`</skill_content>`) or an obfuscated one (`</ description>`), so a change that broke only the attribute-bearing shape was invisible. Added fixtures for the authentic shapes; the suite now pins the delimiter from BOTH sides — mutation-verified that restoring either the broken form or the original `\b` fails a different test. Also folds the skill-name escaping onto a single `SKILL_NAME_TAGS` set instead of chaining two neutralizers, since "apply both to be safe" is what produced the wrong-set bug a round earlier. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(review): pagination invariants across pages, plus the remaining review items **Two ways a malformed listing could delete the user's synced skills.** `parsePage` validated `total` only on EMPTY pages, so `{items: [A], total: 0}` — a self-contradiction — was accepted as the complete workspace and every other skill was pruned. And nothing tied later pages to page 1: page 1 could say `pages: 3`, page 2 could say `pages: 2`, `listAll` would stop on `page >= pages` having never fetched page 3, and everything on page 3 was pruned. Neither needs an attacker — a caching layer or a backend bug is enough, and the failure mode is silent deletion. Pagination is now stateful: page 1 establishes `pages` and `total`, every later page must repeat them, a non-empty page must carry an integer `total` that is at least its own row count, and the echoed `page` must be PRESENT and numeric — "absent" previously meant "unchecked", which let a cached page-1 body stand in for page 2. **Review items.** The auto-load escaper had a hand-picked two-tag list that silently omitted `skill_content`/`skill_files`; it now shares `BODY_BOUNDARY_TAGS` with the on-demand renderer. The `examples` filter used the listing set, so a name carrying `</skill_content>` passed it and reached the tool's parameter description verbatim; it now uses `neutralizeSkillNameText`, and is extracted as `selectExampleNames` so the FILTER is pinned rather than the helper it calls — the first version of that test passed with the filter reverted. Narrowed the `SKILL_NAME_TAGS` doc comment, which claimed every name site uses that set when only two do. **Deliberately NOT changed:** the listing set keeps `skill_content`/`skill_files` out. A static sweep recommended adding them; the human review argued that in a listing those are not boundaries and escaping them inside a `<name>` would mangle a legitimate skill name for no gain. Going with the reviewer, and recording the disagreement rather than silently picking a side. Tests: non-empty page with a contradictory total, a later page lowering the page count, a missing echoed page, the name set covering both boundary families, newline/CR/VT/FF attribute separators, self-closing with an attribute, and the examples filter in both directions. Every new guard mutation-verified individually. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
1 parent 8ccb6c2 commit 6b8361d

21 files changed

Lines changed: 1109 additions & 90 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,48 @@ jobs:
6767
- 'test/windows/**'
6868
6969
# ---------------------------------------------------------------------------
70+
# altimate_change start — run the tracker-leak guard on every PR.
71+
# `script/check-tracker-leaks.ts` and its tests already existed but were wired
72+
# into no workflow, so nothing enforced them: v0.10.0 shipped three new
73+
# `AI-####` references into tracked files on this PUBLIC repo before a human
74+
# review caught them. It scans the branch name, the commits ahead of
75+
# origin/main, and the diff, so it needs full history and the base ref.
76+
tracker-leaks:
77+
name: Tracker Leaks
78+
runs-on: ubuntu-latest
79+
timeout-minutes: 10
80+
# This job runs pull-request code, so it gets read-only scope and no
81+
# persisted credentials — the checked-out branch must not be able to reach
82+
# the token in `.git/config`. (bot review)
83+
permissions:
84+
contents: read
85+
steps:
86+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
87+
with:
88+
fetch-depth: 0
89+
persist-credentials: false
90+
91+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2
92+
with:
93+
bun-version: "1.3.14"
94+
95+
- name: Fetch base branch
96+
# `--depth=0` is not valid git ("depth 0 is not a positive number") and
97+
# failed the job before the guard could run. `fetch-depth: 0` on the
98+
# checkout above already gives full history, so a plain fetch of the
99+
# base ref is all this needs.
100+
run: git fetch origin main
101+
102+
- name: Check for internal tracker references
103+
# `actions/checkout` lands on the synthetic merge commit in detached
104+
# HEAD, so the script's own `rev-parse --abbrev-ref HEAD` yields "HEAD"
105+
# and the branch-name source -- one of the three it documents -- is
106+
# inert. Pass the real head ref explicitly. (review)
107+
env:
108+
PR_BRANCH: ${{ github.head_ref }}
109+
run: bun script/check-tracker-leaks.ts
110+
# altimate_change end
111+
70112
# Main TypeScript tests — excludes driver E2E tests (separate job) and
71113
# cloud credential tests (local-only).
72114
# ---------------------------------------------------------------------------

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.10.0] - 2026-09-02
9+
10+
Workspaces grow from a memory-only pilot into a working surface: a bound workspace now supplies its custom skills, attaches its own engine, and routes warehouse tools through it. Alongside that, a run no longer dies when one oversized tool result overflows the window, and the ChatGPT-subscription model picker was rebuilt against what the backend actually serves. Everything workspace-related stays behind `ALTIMATE_WORKSPACE=1` and is invisible to anyone not opted in — but the harness-reliability changes are the largest part of this release and apply to **every** session, opted in or not.
11+
12+
### Added
13+
14+
- **A bound workspace's custom skills sync into the project.** Skill bundles attached to the workspace are pulled into `.altimate-code/skill/_workspace/<publicId>/`, where the existing discovery finds them with no other change — a synced skill is listed and invoked exactly like a local one. The tree carries its own `.gitignore` so it never reaches version control, is removed when you opt out or disconnect, and a directory the client did not create is never touched. (#1172)
15+
- **The bound workspace's engine attaches as a derived MCP overlay.** In a bound project the `datamate` MCP entry is derived at config load from the workspace's pinned local engine — never written to disk, overriding IDE, hosted and stale entries. Each turn boundary re-reads the binding, replaces the entry on re-link, and retries a failed handshake once. (#1167)
16+
- **Warehouse tools route through the workspace's engine.** A native warehouse capability is shadowed only when the engine materialised the matching tool and attach attests the engine is its own; the redirect happens after the native safety checks, and fails open with a reason otherwise. `--integrations=local` turns it off. (#1168)
17+
- **An offer to install the engine a bound workspace needs.** A missing engine used to be a toast with a command in it. It is now an offer — Install now / Copy command / Not now — and the install only ever runs from an explicit choice; the next turn boundary picks the installed engine up. (#1169)
18+
- **The model is told what a bound workspace serves.** Redirecting to an engine tool did not make the model choose it first, so every session paid a wasted turn learning the rule. The workspace's capabilities are now stated up front. (#1182)
19+
- **Installs are counted from the shell installers, not just npm.** (#1096)
20+
21+
### Fixed
22+
23+
- **Warehouse SDKs are resolved from disk instead of reported missing.** A bare `import("snowflake-sdk")` inside the compiled binary resolved against bunfs, which has no `node_modules`, so an SDK the user had already installed was invisible and reported as "not installed" — the single root cause behind nine open issues, five of them filed automatically by the telemetry scanner. (#1122)
24+
- **Startup scans prune dependency trees again.** `Glob.Options` lost its `ignore` field in the v1.17.9 bridge, so the two `**/mcp.json` scans filtered results after every directory had already been opened and read. On a repo with `node_modules` installed that cost 12.93 CPU-seconds on every startup. Two intended consequences: a `favicon.*` inside `node_modules`/`dist` is no longer eligible as the project icon, and `altimate-code check` with no file arguments no longer picks up vendored SQL. (#1184)
25+
- **Release binaries embed the live models.dev catalog.** Every platform binary was built with a checked-in test fixture as its bundled catalog, whose newest entry was dated 2026-03-30; verified against the shipped 0.9.7 binary in an isolated `HOME`. (#1188)
26+
- **The ChatGPT-subscription model allowlist matches the backend.** The filter was built from the models.dev catalog rather than what the Codex endpoint serves, so it was wrong in both directions: `gpt-5.2`, `gpt-5.6` and `gpt-5.3-codex` were offered and rejected with HTTP 400, while the current flagship subscription models `gpt-5.6-sol`, `gpt-5.6-luna` and `gpt-5.6-terra` were hidden. Every id was verified against a live Pro credential and the `includes("codex")` substring auto-allow — which cannot express the real policy — was replaced with exact matching. The filter now matches on `api.id` rather than the config map key, so a model aliased in config is no longer deleted. (#1179, closes #1178)
27+
- **`gpt-5.4` and `gpt-5.4-mini` are retired from the picker.** Both retired backend-side on 2026-08-31; the replacements are `gpt-5.6-terra` and `gpt-5.6-luna`. (#1190)
28+
- **A large prompt no longer gets a hard 400 before generating anything.** The per-model output-token reservation never consulted `limit.context`, so on a model where prompt and completion share one window a large system prompt pushed input plus reservation past it. The reservation is now clamped against the context window. (#1196)
29+
- **A run survives a single oversized tool result.** Previously the recovery compaction resent the full conversation, overflowed the same way and terminated with "Session too large to compact". It now summarizes what fits, with tightened context-safety margins and compaction fidelity. (#1171)
30+
- **A credential could survive redaction and be replayed.** The mask that replaces cleared tool output is resent on every later request, and two of its fields bypassed the redactor — so an AWS key, an OpenAI key, a `curl` basic-auth value or a signed URL already in the conversation could still be transmitted after the output it came from was pruned. Both fields now go through the same redactor as the rest of the ledger, which also learned to recognise `curl.exe` and path-qualified `curl`. (#1171)
31+
- **Interactive chat no longer ends answers with a literal `DONE`.** The run-mode completion token was declared on the `builder` agent, which is also the agent behind ordinary conversation, and nothing stripped the token before rendering — so it was appended to final answers in normal chat. It is now scoped to run mode. (#1171)
32+
- **MCP diagnostics say what actually went wrong.** `mcp status` now reports each configured server's real state, including drift between discovered and on-disk config. (#1160) `server unavailable` logged the constant string `"failed"` and discarded `status.error`, the field holding the real message — a `401 Unauthorized`, a transport error, the actual cause. (#1159)
33+
- **The marker check runs in a fresh worktree.** `script/upstream/analyze.ts` imported `minimatch` from the repo root, where it was never declared, so the check failed with `Cannot find package minimatch` before it could run. (#1177)
34+
835
## [0.9.7] - 2026-08-25
936

1037
Grep/search reliability fix for everyone, a Codex model-picker unblock, and a first, opt-in look at Workspaces — shared project binding with cloud-synced memory.

‎docs/docs/usage/cli.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ altimate --agent analyst
3232
| `web` | Start the web UI |
3333
| `agent` | Agent management |
3434
| `auth` | Authentication |
35-
| `mcp` | Model Context Protocol tools |
35+
| `mcp` | Model Context Protocol tools -- `mcp list` to see configured servers, `mcp status` for each server's real connection state and any drift between discovered and on-disk config |
3636
| `acp` | Agent Communication Protocol |
3737
| `models` | List available models |
3838
| `stats` | Usage statistics |
@@ -54,6 +54,7 @@ altimate --agent analyst
5454
| `--agent <name>` | Start with a specific agent |
5555
| `--yolo` | Auto-approve all permission prompts (explicit `deny` rules still enforced) |
5656
| `--dangerously-skip-permissions` | Same as `--yolo` (alias for upstream compatibility); auto-approves prompts that aren't explicitly denied. `run` subcommand only. |
57+
| `--integrations <local>` | Use only local warehouse tools instead of routing them through a bound workspace's engine (pilot). Sets `ALTIMATE_INTEGRATIONS` for the process, so child processes inherit it. |
5758
| `--print-logs` | Print logs to stderr |
5859
| `--log-level <level>` | Set log level: `DEBUG`, `INFO`, `WARN`, `ERROR` |
5960
| `--help`, `-h` | Show help |
@@ -85,6 +86,8 @@ Configuration can be controlled via environment variables:
8586
| `ALTIMATE_CLI_DISABLE_TERMINAL_TITLE` | Don't set terminal title |
8687
| `ALTIMATE_CLI_DISABLE_PRUNE` | Disable database pruning |
8788
| `ALTIMATE_CLI_DISABLE_MODELS_FETCH` | Don't fetch models from models.dev |
89+
| `ALTIMATE_WORKSPACE` | Opt into the workspace pilot (`1`). Off by default; nothing about workspaces is active without it |
90+
| `ALTIMATE_INTEGRATIONS` | Set to `local` to keep warehouse tools local rather than routing them through a bound workspace's engine |
8891

8992
### Server & Security
9093

‎packages/opencode/script/build.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,22 @@ for (const item of targets) {
641641
version: Script.version,
642642
os: [item.os],
643643
cpu: [item.arch],
644+
// altimate_change start — do not publish the orphaned sourcemaps.
645+
// `Bun.build` above runs with `sourcemap: "external"`, so it writes
646+
// `index.js.map` / `worker.js.map` next to the binary — but the bundles
647+
// they describe are compiled INTO the executable, so the package shipped
648+
// `.map` files with no `.js` companion: unusable by any consumer that
649+
// follows `sourceMappingURL`, and not read by the binary at runtime
650+
// (verified — it runs and reports errors normally with them deleted).
651+
// They cost 20MB of a 191MB tarball against npm's ~200MB E413 ceiling.
652+
// Keep emitting them for local debugging of `dist/`; keep them out of
653+
// what we publish.
654+
// `**` because `*` does not descend: a `.map` emitted under a
655+
// `bin/<subdir>/` would still ship. Note the allowlist also means any
656+
// future artifact added OUTSIDE `bin/` is silently dropped from the
657+
// published package. (review)
658+
files: ["bin", "!bin/**/*.map"],
659+
// altimate_change end
644660
},
645661
null,
646662
2,

‎packages/opencode/src/altimate/tools/datamate.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ async function handleAdd(args: { datamate_id?: string; name?: string; scope?: "p
210210
output:
211211
`This project is linked to workspace "${managed.name}", whose integrations are served by the ` +
212212
`workspace's own engine under the '${DATAMATE_KEY}' MCP server. Adding datamate '${args.datamate_id}' ` +
213-
`there is not applied. Unlink the project, or run without ALTIMATE_WORKSPACE, to manage that entry by hand.`,
213+
`there is not applied. Unlink the project, or restart with ALTIMATE_WORKSPACE unset, to manage that entry by hand.`,
214214
}
215215
}
216216
// altimate_change end
@@ -373,7 +373,7 @@ async function handleCreate(args: {
373373
output:
374374
`This project is linked to workspace "${managedKey.name}", whose integrations are served by the ` +
375375
`workspace's own engine under the '${DATAMATE_KEY}' MCP server. Creating datamate '${args.name}' ` +
376-
`here would not connect it. Unlink the project, or run without ALTIMATE_WORKSPACE, first.`,
376+
`here would not connect it. Unlink the project, or restart with ALTIMATE_WORKSPACE unset, first.`,
377377
}
378378
}
379379
}
@@ -552,7 +552,7 @@ async function handleRemove(args: { server_name?: string; scope?: "project" | "g
552552
output:
553553
`This project is linked to workspace "${managedKey.name}", whose integrations are served by the ` +
554554
`workspace's own engine under the '${DATAMATE_KEY}' MCP server. It is not removed. Unlink the project, ` +
555-
`or run without ALTIMATE_WORKSPACE, to manage that entry by hand.`,
555+
`or restart with ALTIMATE_WORKSPACE unset, to manage that entry by hand.`,
556556
}
557557
}
558558
// altimate_change end

‎packages/opencode/src/altimate/tools/mcp-discover.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export const McpDiscoverTool = Tool.define("mcp_discover", {
137137
if (managed) {
138138
lines.push(
139139
`\n'${DATAMATE_KEY}' was not added: this project is linked to workspace "${managed.name}", ` +
140-
`whose engine serves that server. Unlink the project, or run without ALTIMATE_WORKSPACE, to add it by hand.`,
140+
`whose engine serves that server. Unlink the project, or restart with ALTIMATE_WORKSPACE unset, to add it by hand.`,
141141
)
142142
continue
143143
}

‎packages/opencode/src/altimate/workspace/engine-probes.ts‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,36 @@ export async function notify(toast: Toast): Promise<void> {
175175
}
176176
}
177177

178+
// altimate_change start — see `printLine`.
179+
function stripControl(text: string): string {
180+
// C0 minus TAB (a tab is harmless here and legitimate in a name), DEL, and
181+
// C1 (U+0080-U+009F) — U+009B is CSI, so a terminal decoding C1 from UTF-8
182+
// would still act on an escape sequence the C0-only range let through.
183+
// (review)
184+
// eslint-disable-next-line no-control-regex
185+
// U+2028/U+2029 are Unicode line/paragraph separators: not C0 or C1, but they
186+
// still break the one-notice-per-line framing this writer depends on. (bot review)
187+
return text.replace(/[\u0000-\u0008\u000A-\u001F\u007F-\u009F\u2028\u2029]/g, "")
188+
}
189+
// altimate_change end
190+
178191
/** stderr, deliberately: `run --format json` documents stdout as raw JSON
179192
* events, and this is a status notice, not run output. */
180193
export function printLine(line: string): void {
181-
if (syncInternals.printLine) return syncInternals.printLine(line)
194+
// altimate_change — strip BEFORE the test-seam branch. Stripping after it
195+
// meant the override path (and therefore anything routed through it) never
196+
// got sanitised at all, so the guard covered only one of the two exits.
197+
// (review)
198+
const safe = stripControl(line)
199+
if (syncInternals.printLine) return syncInternals.printLine(safe)
182200
try {
183-
process.stderr.write(line + "\n")
201+
// altimate_change — these lines embed the workspace NAME, which is
202+
// set server-side and never validated for control characters. Writing it
203+
// raw lets a workspace name carrying ANSI escapes repaint or hide
204+
// surrounding output — including, in a CI log, the "engine not usable"
205+
// notice this function exists to deliver. Strip C0 and DEL; the newline is
206+
// added below, so nothing legitimate here needs them. (review)
207+
process.stderr.write(safe + "\n")
184208
} catch {
185209
// A closed stream must not take down the turn.
186210
}

0 commit comments

Comments
 (0)