Skip to content

v0.7.4: SLICE extension preview for Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Nov 06:48
a70c76c

SLICE v0.7.4 supplies an ordinary extension for unmodified official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0.

Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:

pi install git:github.com/youxi-huang/slice@extension-v0.7.4

Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.7.4 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/slice@extension-preview. A plain pi update updates Pi itself.

This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.

Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.

Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.

Validation: this publication run passed 138 stock-Pi package and lifecycle checks on official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.4.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.

Source commit: a70c76c. Preview runtime: stock-preview+src.c95e6c599a4b7aa1. Resident runtime keeps its v0.3.0 fingerprint.

Usage and recovery · Validation

Changes

v0.7.4 brings the source and installable Pi extension to the same version, including the changes below since v0.7.2. The existing v0.7.3 tag remains a source-only release and is not moved; the matching installable package is extension-v0.7.4. This release preparation changes no runtime behavior, checkpoint format, resident build fingerprint or evaluation pin.

Added

  • The preview evaluation set gains P5, one long session for compactions on 200k and 272k routes: its checkpoints 1, 3 and 5 are three rounds at about 150,000 tokens of context, 2 and 4 two rounds at about 204,000, each later round compacting with the earlier notes in place. Its probes ask for early facts after two and three notes and for values that changed between rounds. P5 has its own version and manifest, so P1 to P4 keep their pins. The preview bench selects a route's rounds with --cuts, runs only the session's own probe condition with --probe-conditions history, stops a run at the first request past --max-input-tokens, cached tokens included, and with --compactions-only runs a chain without its probes. --cache session runs each warm-up turn on the session itself, so the writer continues it as it continues a session's last turn, which OpenAI's implicit cache needs.
  • scripts/context-memory-host-run.mjs runs fixture P5 as a session on the official OpenCode 1.19.4 or DSH 0.2.1-rc.3, with the Slice retrieval package and a 200k or 272k route's capacity profile. A local stand-in for OpenAI's Responses API answers with --provider loopback; --provider openai sends GPT-6 Luna requests through the proxy secret. The user pastes every command's output and the host's own model replies, so native compaction runs at the profile's line; after two compactions the run asks P5's questions, then four exact log timestamps that summaries rarely keep. No request may reach 262,000 tokens by estimate, and a provider run needs request, time and cost limits, which hold inside a turn too. report.json records each model call's usage, the compactions and their pauses, the retrieval calls and both scores.
  • The preview bench's --arm native runs a probes chain with no package loaded, so Pi's own compaction summarizes each cut with the same model, thinking level and settings, and the probes answer from Pi's summary. It takes only --probe-conditions none, since there is no context_history without the package, and its summary calls count toward --max-input-tokens. Paired with a Slice run's history condition it compares what a user gets with and without the package; the first pair, on GPT-6 Luna at medium, is in the validation record.
  • scripts/context-memory-pressure-profile.mjs prints native compaction settings for Pi, OpenCode 1.19.4 and DSH 0.2.1-rc.3 from verified context, output and optional input limits. A 200k route with a 32k output cap gets a 150k trigger and 15k of recent text; --model scopes Pi's values to that route. Missing or contradictory limits are refused, and OpenCode without limit.input is reported as keeping its 168k line. The script writes nothing and changes no adapter's scope.

Fixed

  • The independent preview no longer stops a long session short of Pi's compaction trigger. Its request guards estimated four characters per token, while Pi's trigger reads the provider's reported usage; English prose and escaped code run past four characters a token, so on GPT-6 Luna at Pi's defaults the guards stopped requests about 16,000 to 18,000 tokens before the trigger and no automatic compaction ran. Both guards now read Pi's own count once a response has reported usage, and the session writer sizes its prefix by it too. Because Pi's default reserve of 16,384 tokens is less than the session writer's handover takes on a 272,000-token route, a settled turn whose context, with one more turn as large as that reserve or as the turn just settled, would leave the handover no room now starts the compaction /compact would, once per checkpoint interval. One-shot print and json runs, which exit when the turn settles, leave it to Pi's trigger.
  • /compact right after a turn that ended on a provider error, an abort or a stopped request now compacts instead of pausing the session with CONTEXT_TOOL_BOUNDARY, which said a turn was still running when none was. That turn stays whole after the checkpoint, and the session writer's prefix now ends at the last completed turn: ending on the turn's unanswered request led GPT-6 Luna to answer it instead of writing the note, refused as CONTEXT_NOTE_INVALID on every retry.
  • A note whose sources include an ID naming no entry, or an entry with nothing to read, is no longer refused when every fact keeps a readable source: those sources are dropped and the note is checked again, and /compaction-status counts them as scopeDropped. On GPT-6 Luna one ID a character off a real one, beside three valid citations, refused the same note on every retry. A fact that would be left without a source, or a supersedes ID out of scope, still refuses with CONTEXT_NOTE_SCOPE.
  • The resident runtime's session writer no longer adds a second system prompt to a session whose first recorded prompt sits mid-history, as in a session begun before prompts were recorded. It checked only the first message, so it put the current prompt and tools at the head as well, which duplicated the instructions and could revive tools the transcript had removed; its request-size estimate counted the prompt twice. A regression covers the mid-history case beside the existing one at the head.
  • The independent preview's session writer now reads the session's prompt cache in a session begun before Pi 1.4.0. Pi 1.4.0 records the system prompt in the transcript, there mid-history, and sends no leading prompt; the writer added one at the head, so its request diverged from the session's at the first item and wrote the whole context to the cache again. On GPT-6 Luna, with 150,000 tokens of context, the writer read 0 tokens before the fix and 150,145 after it, at a quarter of the cost. Over five compactions on 200k and 272k routes the writer read 95 to 97% of its input from the cache and cost 59 to 63% less; the pause, set mostly by reasoning at max, did not shorten consistently. The request-size estimate and the excerpt check follow the same rule.
  • context_history search on OpenCode, DSH and the independent preview opens each excerpt where the most query terms meet, not at the first place any one of them appears, and no longer returns the tool's own earlier results. On GPT-6 Luna a query for one line of a long log opened hundreds of lines early, and each search brought back copies of the ones before; finding four exact timestamps took 15 to 28 calls on each host, and one answer was a guess from the log's cycling timestamps. After the fix the same four took four calls on each host, all right. The ranking version is 3, so a cursor from an earlier search is refused. The preview now uses the core's search; the frozen resident runtime keeps its own copy. DSH records name each tool result after its call.
  • Optional Pi preparation now starts below Pi's actual trigger, read from its effective reserveTokens with any per-model override first. A trigger lowered to 150k used to leave preparation waiting at 160,664, after compaction had already run. Pi's defaults keep the old band; the checkpoint format, the once-per-interval call limit and failure blocking are unchanged.

Changed

  • The preview bench measures openai/gpt-6-luna on OpenAI's official API with --provider openai, which replaces --provider codex and the ChatGPT subscription. summary.json records the provider as openai and the endpoint as api.openai.com, writer rows add openaiResponses, and a unit stops before its first request if the catalog serves Luna from another host. Usage and cache reads are OpenAI's own, so the cache share of these runs compares with other providers' runs. --provider relay stays for third-party relays.
  • docs/context-memory/openai-api.md replaces the Codex subscription guide. It sets up the key as a network secret, verifies Pi, OpenCode 1.19.4 and DSH 0.2.1-rc.3 with one request each, and records where each host puts GPT-6 Luna's window: 272,000 tokens in Pi and DSH, the line where OpenAI's long-context price begins, and 1,050,000 in OpenCode.
  • The DSH and OpenCode context_history descriptions now say when to use the tool: summaries drop exact values, quotes and timestamps, so search before answering that an earlier detail is unknown. In one real session that had answered four such questions unknown without a search, two new ones were searched and answered right.
  • The README's Get started covers all three hosts: Pi first, then the DSH and OpenCode steps, which had sat in their own section after the Pi update and recovery notes.

Maintenance

  • With the maintainer's approval in this release cycle, the resident build fingerprint changed to 1.1.0-context-memory.0.3.0+src.c1ed81ca7698d24e for the resident fix above, and the frozen evaluator was pinned to that source, b5b1053; fixture and scorer locks are unchanged. Earlier records keep their own pin. The resident release version stays v0.3.0.
  • CI now builds the tree and runs both acceptance checks on Node 24 and 26 as well, for every pull request and push to main that changes more than Markdown. Node 22 still runs the full pipeline and remains the only Node a release is verified on. The newer majors run in a workflow of their own, because publication requires the whole Node 22 workflow run on main to succeed, so neither can block or approve a release. The supported range, >=22.19.0, the dependencies and the build fingerprints are unchanged.