Skip to content

Commit 29f74c6

Browse files
committed
Merge commit 'da4a99823395476f7eb915446ef228166c973869' into HEAD
2 parents ded5536 + da4a998 commit 29f74c6

57 files changed

Lines changed: 8590 additions & 6042 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,23 @@ jobs:
111111

112112
test-sqlite:
113113
needs: [changes, lint]
114-
if: github.event_name != 'schedule' && (github.event_name != 'pull_request' || needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true' || needs.changes.outputs.workflows == 'true')
114+
# `docs` is in this condition and NOT in the other test jobs' on purpose.
115+
# Part of the suite this job runs takes documentation as its INPUT and
116+
# asserts on its content — tests_py/scripts/test_codex_plugin_contract.py
117+
# reads README.md and checks the canonical published identities (the
118+
# hypermnesia-mcp-viz anchor, the viz/spec migration strings). Excluding
119+
# '*.md' from the `code` filter therefore switched those guards OFF exactly
120+
# when their subject changed: PR #509 was a README-only diff, every test job
121+
# was skipped, it merged green, and the push to main went red on that test
122+
# across five jobs (run 34238410970, 2026-09-08 — 7663 passed, 1 failed;
123+
# fixed by #510).
124+
#
125+
# This job, not the 3.10-3.13 matrix, because it already runs THE FULL SUITE
126+
# (see the "Scope" note on its pytest step) in one ~5-minute job, so it
127+
# covers the doc-contract tests at the smallest cost that still closes the
128+
# gap. Waking the whole matrix on every prose edit would undo the CI work in
129+
# #475-#481.
130+
if: github.event_name != 'schedule' && (github.event_name != 'pull_request' || needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true' || needs.changes.outputs.workflows == 'true' || needs.changes.outputs.docs == 'true')
115131
name: Test (SQLite backend)
116132
runs-on: ubuntu-latest
117133
# source: run 33806380625 (2026-09-03), max 292s; ceil(2 * 292 / 60).
@@ -262,8 +278,25 @@ jobs:
262278
# untrusted fork; same-repository PRs and main/workflow_dispatch remain
263279
# covered by this vendor-parser contract.
264280
runs-on: ubuntu-latest
265-
# source: run 33951959734 (2026-09-05), max 61s; ceil(2 * 61 / 60).
266-
timeout-minutes: 3
281+
# source: run 34217620888 job 102033099129 (2026-09-08), whole job 52s;
282+
# run 34210128951 job 102009142706 (2026-09-08), whole job 194s.
283+
# ceil(2 * 194 / 60) = 7.
284+
#
285+
# The former bound was ceil(2 * 61 / 60) = 3 from run 33951959734
286+
# (2026-09-05, max 61s). That 2x margin was computed against a sample
287+
# that never saw this job's real tail, and 180s sits INSIDE the range
288+
# of a legitimate passing run: the dominant cost is the last step's
289+
# `scripts/verify_mcp_hosts.py`, which boots the plugin through `uvx`
290+
# against a deliberately COLD uv cache (UV_CACHE_DIR/UV_TOOL_DIR under
291+
# RUNNER_TEMP, --allow-bootstrap-network), so it pays a full network
292+
# package resolve+build every run. Both samples above PASS the same
293+
# assertions and differ only in that bootstrap: 23.98s vs 179.86s
294+
# ("PASS codex-cli/lean: initialize + discovery + memory_stats
295+
# (10 tools, …)"), a 7.5x spread. The coldness is the point of the
296+
# test — it is the path a first-time user hits — so the variance
297+
# cannot be engineered away without destroying what the job asserts;
298+
# the bound has to cover the measured tail instead.
299+
timeout-minutes: 7
267300
permissions:
268301
contents: read
269302

@@ -889,7 +922,16 @@ jobs:
889922
if: github.event_name != 'pull_request' || needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true' || needs.changes.outputs.workflows == 'true' || needs.changes.outputs.docker == 'true'
890923
name: Docker Smoke (bare-container DB-less contract)
891924
runs-on: ubuntu-latest
892-
# source: run 33951959734 (2026-09-05), max 369s; ceil(2 * 369 / 60).
925+
# source: run 34217523633 job 102032799571 (2026-09-08, push to main,
926+
# warm cache): whole job 242s, of which the build step 225s — the steady
927+
# state this bound is sized against; ceil(2 * 242 / 60) = 9, kept at 13
928+
# for headroom over the 369s tail measured on run 33951959734
929+
# (2026-09-05). The bound is NOT sized against a cold `mode=max` cache
930+
# EXPORT: run 34225008423 job 102057139452 (2026-09-08, PR #492) finished
931+
# building at 70.8s and was still in `exporting to GitHub Actions Cache`
932+
# when the 13-minute bound fired at 827s, so the smoke-test body never
933+
# ran. That export is removed from pull_request runs below rather than
934+
# budgeted for — see the cache-to comment.
893935
timeout-minutes: 13
894936
# BLOCKING: this job asserts the exact contract that silently broke for
895937
# two months (fix/bare-container-contract, commit 5d71069c) — third-party
@@ -922,7 +964,25 @@ jobs:
922964
tags: cortex-smoke:local
923965
load: true
924966
cache-from: type=gha
925-
cache-to: type=gha,mode=max
967+
# Write the layer cache only on pushes to a branch, never on a
968+
# pull_request run. GitHub Actions scopes a cache entry to the ref
969+
# that created it: the default branch's entries are readable from
970+
# every branch, but an entry a PR run writes is readable only by
971+
# that same PR's later runs. This job runs once per head commit, so
972+
# a PR-written entry is exported and then never read — pure cost on
973+
# the critical path. `cache-from` is unconditional, so PRs keep
974+
# reading main's warm cache and the torch CPU-wheel layer is still
975+
# not re-downloaded.
976+
# source: GitHub Actions cache "Restrictions for accessing a cache"
977+
# (docs.github.com/actions/writing-workflows/choosing-what-your-
978+
# workflow-does/caching-dependencies-to-speed-up-workflows), and
979+
# the measurement below.
980+
# The condition is written as `!= 'pull_request' && <value> || ''`
981+
# and not `== 'pull_request' && '' || <value>`: GitHub expressions
982+
# return the operand, not a boolean, and the empty string is
983+
# falsy, so the latter form would fall through to <value> on
984+
# every event and disable nothing.
985+
cache-to: ${{ github.event_name != 'pull_request' && 'type=gha,mode=max' || '' }}
926986

927987
# Reuses the build above (load: true made it visible to the local
928988
# docker daemon) instead of rebuilding — scripts/docker_smoke.sh is the

‎CHANGELOG.md‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,49 @@ adheres to [Semantic Versioning](https://semver.org/).
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- **Docker Smoke no longer times out on pull requests.** The job wrote its
12+
buildx layer cache with `cache-to: type=gha,mode=max` on every event. On
13+
run 34225008423 (PR #492) the image build finished at 70.8s and the job
14+
was still in `exporting to GitHub Actions Cache` when the 13-minute bound
15+
fired at 827s — the smoke-test body never ran, so the PR went red on a
16+
step that asserts nothing. GitHub scopes a cache entry to the ref that
17+
wrote it, and this job runs once per head commit, so a PR-written entry is
18+
exported and never read. The export is now skipped on `pull_request`;
19+
`cache-from` stays unconditional, so PRs keep reading `main`'s warm cache
20+
(whole job 242s there, run 34217523633). The two sibling `Docker Build`
21+
jobs already used `mode=min`; this removes the odd one out.
22+
23+
- **A truncated SessionStart banner line is no longer a dead end.** Every
24+
memory line in the banner is cut at 120 characters by `_short`, but the
25+
rendered line carried no id — the reader could see that content had been
26+
cut and had no handle to fetch the rest, only a fresh search whose top hit
27+
is not guaranteed to be the same row. This was the one truncation path in
28+
the system that dropped the key: `core/response_budget.py` already states
29+
"Truncated items ... keep their id, so truncation is never a dead end", and
30+
`core/gist_extraction.py` keeps its artifact pointer. Truncated banner
31+
lines now end in `\u27e6mem:<id>\u27e7`, readable back with
32+
`recall(memory_id=...)`. Untruncated lines are unchanged (no key needed —
33+
the whole memory is already there), so the cost is proportional to what was
34+
actually lost, and the one-line legend is emitted only when a key was.
35+
Where lines are cut is byte-identical; only what a cut line carries
36+
changes. Distinct from the `\u27e6rcpt:id\u27e7` receipt, which answers
37+
*which* memories were in context (`why`, Pearl rung-1) and never hands back
38+
content.
39+
40+
- **`benchmarks/reproduce.sh`'s published `FLOOR_*` check no longer blocks
41+
the build.** `main` itself measures below the published floors (LongMemEval
42+
MRR 0.904988 < 0.914, LoCoMo MRR 3-run mean 0.779868 < 0.805, Recall@10
43+
0.889506 < 0.915 — cdeust/Cortex PR #492), so every PR built on `main`
44+
inherited an already-failing gate. `check_floors` stays informational
45+
(rounds `got` to the same 4-decimal precision it prints before comparing,
46+
matching what's on screen) but no longer `exit 1`s — same disposition as
47+
the pyright ratchet (issue #188). Added `--no-regression` /
48+
`--baseline-ref`: the blocking gate a PR should use instead of lowering
49+
`FLOOR_*`, comparing HEAD against a baseline ref's own measured scores
50+
rather than a fixed number.
51+
952
## [4.19.1] - 2026-09-03
1053

1154
### Fixed

0 commit comments

Comments
 (0)