Skip to content

Release 0.8.0 — context-aware memory delivery, and the evidence that proved it - #10

Merged
schneiderjoseph merged 3 commits into
mainfrom
release/0.8.0
Sep 14, 2026
Merged

schneiderjoseph merged 3 commits into
mainfrom
release/0.8.0

Conversation

@schneiderjoseph

@schneiderjoseph schneiderjoseph commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Releases 0.8.0. Three commits on top of ddbdcf5 (main, v0.6.0): a7175d8 is the release, 07bbf5a and af1e029 fix a defect CI found on this branch after publication. CI is green on all four runners.

0.7.0 — skipped, not published, documented

0.7.0 prepared devia context and devia contribute but was never committed: no tag, no branch,
no stash, nothing in the reflog held a source state for it, and 0.8.0 rewrote the surfaces it
introduced (context.maxTokenscontext.budget/context.mode, strict compression, the
CTX-BUDGET gate, impact-map routing, evidence hashing, and a benchmark rewritten from 6
scenarios to 352 runs) before either reached npm.

Publishing it would have meant hand-carving a source tree that never existed and was never
tested, then making its changelog claims true by deduction — for a permanent npm artifact. It is
skipped instead. Its CHANGELOG section is preserved and marked (never published) with the
reason and a pointer to 0.8.0, so an adopter looking for 0.7.0 on npm understands. No
v0.7.0 tag was created.
npm goes 0.6.0 → 0.8.0.

0.8.0 — published

The published tarball's shasum, cbaf12cc426128862c68938d654074909b0d79a0 (449 files,
590,948 B unpacked), is identical to the tarball packed from this branch and exercised before
publication — the pre-publication verification applies to the published artifact bit for bit.

Tests performed

Command Result
npm test 135 pass · 0 fail (52 s)
npm run validate 141 rules · 45 P0 · 56 automatable · 23 domains · 551 links in 379 files · index current
node bin/devia.mjs check --root . 15 pass · 1 warn (OPS-001, lint not referenced) · 3 skip · P0 clear · exit 0
node bin/devia.mjs validate 19 pass · exit 0

No test or threshold was modified to reach these numbers.

Benchmark verification

npm run benchmark:context352 runs (4 corpus shapes × 11 task types × 4 targets × 2 modes):

Critical-rule recall     100% in 352/352 runs
Routing accuracy         100% in 352/352 runs
Strict budget compliance 176/176 runs never exceeded the target
Advisory over target      68/176 runs, all because the mandatory floor exceeded it
Mean task-generic share  66.9% of selected tokens
Mean supporting filler    2.3% of selected tokens
Mean selection time       1.7 ms per run

In all 68 advisory overruns selected equals the mandatory floor to the token. Token counts are
estimates from src/lib/tokens.mjs, not a tokenizer's output. Cost per correct decision is not
measured.

Package verification

Tarball: 449 files, 191.9 kB packed. Audited for .git, .env, node_modules, tests/,
.devia/, contribution payloads, reader.html, *.pem, *.key, logs and fixtures — none
present
. Top level is bin, src, rules, checklists, standard, compliance, schema,
templates, skills, scripts and the governance docs, matching files in package.json.

Installed twice into clean temporary directories — once from the local tarball before publishing,
once from the registry afterwards — and exercised both times:

devia --version      → devia 0.8.0 · standard 0.2.0
npx devia --version  → devia 0.8.0 · standard 0.2.0
devia init           → 16 memory files, devia.json, .devia/.gitignore, 5 agent adapters · exit 0
devia validate       → 18 pass · 14 warn (unfilled template placeholders) · exit 0
devia check          → BLOCKED, 2 P0 (CI-PRESENT, TST-PRESENT) · exit 1 — correct for an empty
                       directory with no tests and no CI, not a packaging defect
devia context        → advisory: selected 1642 = mandatory floor 1642, target 1200, OVER TARGET
devia context --strict --budget 600
                     → selected 598 ≤ 600, WITHIN TARGET, DEGRADED
devia contribute     → --help and list only; no remote submission was performed

Release notes

CHANGELOG.md carries the 0.8.0 entry and the annotated 0.7.0 entry. The GitHub Release notes
state explicitly that the contribution workflow is not automatic (submit writes the payload
and prints the gh command), that token counts are estimates, and that cost per correct decision
is not measured.

07bbf5a + af1e029 — a defect CI found after publication

The first CI run on this branch failed on one of four runners — ubuntu-latest, node 22 —
with not ok 58 - the benchmark passes: the saving never costs a blocking rule and
Unterminated string in JSON at position 146032. Windows node 20, Windows node 22 and ubuntu
node 20 all passed, and so did every local run.

It is not a selection defect. scripts/benchmark-context.mjs --json emits a ~180 kB report and
the test reads it through a pipe. Two things were wrong, and the first fix only found half of it:

  • console.log followed by process.exit() discards whatever is still buffered. On Windows
    stdout is synchronous so the write always completed; on POSIX it is asynchronous and the exit
    cut it off. 07bbf5a replaced it with a synchronous write.
  • That was still not enough. CI failed again at the same byte, 146032 of 182402 — an
    identical cut point is not a race. A single fs.writeSync on a non-blocking pipe writes what
    currently fits and returns short, and the return value was being discarded; the remaining 36 kB
    were never written. af1e029 loops until every byte is gone, treating EAGAIN as "the reader
    has not drained yet" rather than an error.

A redirect to a file never showed this either, because a file descriptor is not non-blocking.
Only a pipe — exactly what execFileSync hands the test — could.

Scope and consequence. Both commits touch scripts/benchmark-context.mjs and nothing else.
bin/ and src/ contain no process.exit() call at all — the CLI uses process.exitCode
throughout and was never exposed to this. The published 0.8.0 CLI is unaffected and the version
is not bumped.

One divergence worth stating plainly: the 0.8.0 tarball on npm carries the unfixed benchmark
script.
It is a development script no adopter runs, the table form of npm run benchmark:context was never affected, and the measurements are identical before and after. If
you would rather npm and main match exactly, that wants an 0.8.1 — it is not a correctness
reason to republish.

Not verified

  • devia contribute submit --yes, which is the only network path in devia — deliberately not
    exercised
  • Agent compatibility beyond the five adapter files init writes; no claim of universal agent
    compatibility is made anywhere in the release notes

Two commands and the pass that closed their limitations, landing in one commit
because none of it was ever committed. The 0.7.0 that introduced `devia context`
and `devia contribute` never had a source state of its own -- 0.8.0 rewrote the
surfaces it added before either reached npm -- so it is not tagged and not
published. CHANGELOG keeps its section as the record of what those commands were
when they were written, marked never published. npm goes 0.6.0 to 0.8.0.

`devia context` selects the smallest sufficient context for one task. The corpus
is addressable items, not files: a rule, a memory section split at its heading,
one never/always line, one gap or debt row, one impact-map duty. Five tiers
decide what the context is, a token budget decides how much fits, and a blocking
constraint is admitted before the budget is consulted.

`devia contribute` turns a devia problem hit inside somebody's repository into an
issue or a pull request under two constraints: a candidate is eligible only
because devia re-ran the recorded invocation in a minimal fixture and observed
the behaviour (AGT-012), and nothing of the user's repository is uploaded --
secrets, addresses, paths and account names are redacted on the way in and the
payload is re-scanned before any upload (PRIV-005). A surviving secret shape
blocks rather than warns.

The hardening is what the benchmark forced:

- A target is not a floor. Target, mandatory floor and selected now travel
  together, and the promise is explicit per mode: advisory may exceed the target
  and says so, strict never does. Compression buys mandatory items back toward
  full text in relevance order, so a larger target always returns more text --
  the first implementation did this backwards and that is now a test. `devia
  check` gains CTX-BUDGET (P2). Closes G11
- The impact map is a router, not only a checklist. A declared change type routes
  the domains of the memory files it names, so a project that invents
  `new_consent_record` routes as well as a built-in does. Closes D12
- Evidence is bound to the experiment that produced it. Every run records a
  digest of the fixture and of the bin/ + src/ that ran it; a fix has to agree
  about the first and disagree about the second. Editing the fixture until it
  passes now reports the reproduction changed and stays at `reproduced`.
  Closes D10

Also fixed: the benchmark rebuilt its corpus for every combination, forty times
slower than the thing it measures. Read once per shape, cloned per run: 79s to
1.5s.

Version: package 0.8.0, standard 0.2.0 (AGT-012, AGT-013, PRIV-005).

Verified: 135 tests pass; validate clean (141 rules, 551 links, index current);
check P0 clear (15 pass, 1 warn OPS-001, 3 skip); memory validate 19 pass.
Benchmark 352 runs -- critical-rule recall 100%, routing accuracy 100%, strict
budget compliance 176/176, advisory over target 68/176 and in all 68 selected
equals the mandatory floor to the token. Cost per correct decision is not
measured and the output says so.
CI caught it on ubuntu node 22 and nowhere else: `not ok 58 - the benchmark
passes: the saving never costs a blocking rule`, failing on `Unterminated
string in JSON at position 146032`. Not a selection defect -- the report is
182 kB and the test was reading the first 146 kB of it.

`console.log` then `process.exit()` loses whatever is still buffered. On
Windows stdout to a pipe is synchronous, so the write always completed; on
POSIX it is asynchronous and the exit cut it off once the report outgrew the
pipe buffer. ubuntu node 20 won the race, node 22 did not. A test that passes
on three of four runners because of timing is the worst kind of green.

`fs.writeSync(1, ...)` blocks until the bytes are gone, so the exit on the next
line cannot truncate it. The failure path drops to `process.exitCode`, which is
what bin/devia.mjs and src/lib/ui.mjs already use -- the CLI never calls
process.exit() and was never exposed to this.

Scope: scripts/benchmark-context.mjs only. Nothing in bin/ or src/ changes, so
the published 0.8.0 CLI is unaffected and the version is not bumped. The
0.8.0 tarball on npm carries the unfixed script; no adopter runs it.

Verified: `node scripts/benchmark-context.mjs --json` emits 182585 bytes that
parse whole -- ok true, 352 rows, 0 failures. 135 tests pass. Benchmark
unchanged at 352 runs, recall 100%, routing 100%, strict 176/176.
The previous commit was the right diagnosis and the wrong remedy. CI failed
again on ubuntu node 22, at byte 146032 of 182402 -- the same byte as before.
An identical cut point is not a race; a single fs.writeSync on a non-blocking
pipe writes what currently fits and returns short, and the return value was
being discarded. The remaining 36 kB were never written.

Loop until every byte is gone, treating EAGAIN as "the reader has not drained
yet" rather than an error. Windows never showed this because stdout there is
synchronous and the first call always completed; a redirect to a file did not
show it either, because a file fd is not non-blocking. Only a pipe -- which is
exactly what execFileSync gives the test -- could.

Still scripts/benchmark-context.mjs only. bin/ and src/ are untouched and the
published 0.8.0 CLI remains unaffected.

Verified: the report through a pipe is 182402 bytes and parses whole -- ok
true, 352 rows, 0 failures. 135 tests pass locally, but the defect only
reproduces on POSIX, so ubuntu is the run that decides this.
@schneiderjoseph
schneiderjoseph merged commit 72b46c3 into main Sep 14, 2026
5 checks passed
@schneiderjoseph
schneiderjoseph deleted the release/0.8.0 branch September 14, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant