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
3 changes: 3 additions & 0 deletions .github/ci/integration-paths.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ src/tests/spine/test_backfill.py
src/tests/spine/test_canonical_bounds_sql.py
src/tests/spine/test_clustering.py
src/tests/spine/test_component_versions.py
src/tests/spine/test_d123_context_nomination.py
src/tests/spine/test_deployment_bootstrap.py
src/tests/spine/test_document_inventory.py
src/tests/spine/test_fact_application_writer.py
Expand Down Expand Up @@ -58,3 +59,5 @@ src/tests/spine/test_claim_occurrence_provenance.py
src/tests/spine/test_d119_multi_span.py
src/tests/spine/test_d119_migration.py
src/tests/workers/test_d119_versions.py
src/tests/spine/test_d122_selection.py
src/tests/spine/test_d122_e2.py
3 changes: 3 additions & 0 deletions .github/ci/unit-paths.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ src/tests/benchmarks/test_locomo_sharding.py
src/tests/benchmarks/test_locomo_store_backup.py
src/tests/core/test_blockizer_corpus.py
src/tests/core/test_chunker.py
src/tests/core/test_context_references.py
src/tests/core/test_consumption_skill.py
src/tests/core/test_conversion.py
src/tests/core/test_core_manifest.py
Expand All @@ -44,6 +45,7 @@ src/tests/core/test_knowledge_hashing.py
src/tests/core/test_knowledge_planner.py
src/tests/core/test_knowledge_writer.py
src/tests/core/test_section_snap.py
src/tests/core/test_selection_references.py
src/tests/core/test_source_passages.py
src/tests/core/test_structure_skeleton.py
src/tests/core/test_temporal.py
Expand Down Expand Up @@ -96,6 +98,7 @@ src/tests/workers/test_d79_summaries.py
src/tests/workers/test_d79_summary_consumption.py
src/tests/workers/test_e3_bare_head_noun.py
src/tests/workers/test_e3_claim_normalize_fanout.py
src/tests/workers/test_e3_context_references.py
src/tests/workers/test_e3_entity_obs_flush_fanout.py
src/tests/workers/test_extraction_temperature.py
src/tests/workers/test_hard_forget_handler.py
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ jobs:
config = Config("alembic.ini")
config.set_main_option("sqlalchemy.url", database_url)
reset_database(config=config)
command.upgrade(config=config, revision="p9_30_0051")
command.upgrade(config=config, revision="p9_31_0052")
engine = create_engine(database_url)
DeploymentBootstrapper(engine=engine).bootstrap_deployment(
deployment_input=deployment
Expand All @@ -355,7 +355,7 @@ jobs:
PY
test "$(docker compose --env-file .env.example exec -T postgres \
psql -U rememberstack -d rememberstack -Atc \
'SELECT version_num FROM alembic_version')" = 'p9_30_0051'
'SELECT version_num FROM alembic_version')" = 'p9_31_0052'
test "$(docker compose --env-file .env.example exec -T postgres \
psql -U rememberstack -d rememberstack -Atc \
'SELECT count(*) FROM deployments')" = '1'
Expand Down Expand Up @@ -395,14 +395,14 @@ jobs:
| grep -E '^(api|worker-(convert|structure|chunk|embed-chunk|extract-claims|normalize-relations|adjudicate-observations|adjudicate-supersession|embed-claim|reconcile|label-relation))$' || true)"
test "$(docker compose "${compose_args[@]}" exec -T postgres \
psql -U rememberstack -d rememberstack -Atc \
'SELECT version_num FROM alembic_version')" = 'p9_30_0051'
'SELECT version_num FROM alembic_version')" = 'p9_31_0052'

release_gate
wait "$compose_pid"
trap - EXIT
test "$(docker compose --env-file .env.example exec -T postgres \
psql -U rememberstack -d rememberstack -Atc \
'SELECT version_num FROM alembic_version')" = 'p9_31_0052'
'SELECT version_num FROM alembic_version')" = 'p9_32_0053'
test "$(docker compose --env-file .env.example exec -T postgres \
psql -U rememberstack -d rememberstack -Atc \
'SELECT count(*) FROM deployments')" = '1'
Expand Down
49 changes: 31 additions & 18 deletions benchmarks/locomo/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# RS-LoCoMo-Full-v30 setup
# RS-LoCoMo-Full-v31 setup

v31 (2026-09-14) pins D122 source-backed document references and D123
contextual fact nomination on the combined D119–D121 processing contract, and
requires the supported ingest stage `ground_claims` (Claimify after Selection).
Extractor generation includes `assertion-clarity-4:d122-source-references-1`;
normalizer `assertion-clarity-3:d123-context-refs-2`; relation and observation
adjudicators `concise-handles-5:d123-context-nom-2`; concise renderer
`concise-handles-2`. Stores ingested under v30 are not comparable and must be
re-ingested for this protocol. Dataset, provider defaults, answer/judge
behavior and scoring are unchanged. The changed pins do not establish improved
quality or lower cost.

v30 (2026-09-14) combines D119 multi-span extraction with D120/D121 clear
processing instructions and compact adjudication input. Extractor generation
Expand Down Expand Up @@ -43,12 +54,12 @@ The safe first command is local and makes no API or model call:
uv run --extra benchmark python -m benchmarks.locomo prepare \
--dataset /absolute/path/locomo10.json \
--tier smoke \
--protocol full-v30 \
--protocol full-v31 \
--output .benchmark-runs/locomo-smoke
```

The harness validates the pinned bytes, renders session documents, and fingerprints the
eight-question smoke plan. `--protocol` is prepare-only; `full-v30` is the one
eight-question smoke plan. `--protocol` is prepare-only; `full-v31` is the one
current-system protocol, and every later stage reads that immutable choice from
`run.json`. Do not run remote stages until reviewing
[`locomo_benchmark_design.md`](../../plan/designs/locomo_benchmark_design.md).
Expand Down Expand Up @@ -195,17 +206,19 @@ Pass the resulting
with `--p3-root`. The runner rejects a mount whose `.snapshot-version` differs
from readiness.

## Gemma 4 on Vertex as the answer agent (`full-v30-gemma-vertex`)
## Gemma 4 on Vertex as the answer agent (`full-v31-gemma-vertex`)

`full-v30-gemma-vertex` is a *variant* of `full-v30`, not a new benchmark
identity: every pin is identical -- ingestion bindings, prompts, tool catalog,
budgets, temperature, and the frozen Luna judge -- except that the answer
agent is `google/gemma-4-26b-a4b-it-maas`, Google's managed Gemma 4 26B-A4B
model on the Gemini Enterprise Agent Platform (formerly Vertex AI), and the
answer step is pinned as `DiscriminatedAnswerAgentStep`. Its scores therefore
compare answer agents over the same stores. The judge and the preflight
embedding stay on OpenRouter, so the OpenRouter key is still required; only
the answer-agent model name routes to Vertex.
`full-v31-gemma-vertex` is a *reader-only variant* of `full-v31`, not a new
benchmark identity and not a processing configuration: every ingest pin is
identical -- pipeline stages including `ground_claims`, component generations,
model bindings, prompts, tool catalog, budgets, temperature, and the frozen
Luna judge -- except that the answer agent is `google/gemma-4-26b-a4b-it-maas`,
Google's managed Gemma 4 26B-A4B model on the Gemini Enterprise Agent Platform
(formerly Vertex AI), and the answer step is pinned as
`DiscriminatedAnswerAgentStep`. Its scores therefore compare answer agents
over the same stores. The judge and the preflight embedding stay on OpenRouter,
so the OpenRouter key is still required; only the answer-agent model name
routes to Vertex.

The step shape differs for a measured reason. Vertex's constrained decoder
emits object keys in **alphabetical** order and demands every required key,
Expand All @@ -226,7 +239,7 @@ Prepare it explicitly; every later stage reads the immutable choice:
uv run --extra benchmark python -m benchmarks.locomo prepare \
--dataset /absolute/path/locomo10.json \
--tier smoke \
--protocol full-v30-gemma-vertex \
--protocol full-v31-gemma-vertex \
--output .benchmark-runs/locomo-gemma-smoke
```

Expand Down Expand Up @@ -268,7 +281,7 @@ any upload.

## Codex ChatGPT subscription for answer and judge

`full-v30-codex-subscription` runs both evaluator seats through the official
`full-v31-codex-subscription` runs both evaluator seats through the official
local Codex app-server and the operator's existing ChatGPT login. It does not
read or copy `~/.codex/auth.json`, accept an OpenAI API key, or call the private
ChatGPT response route directly. Run `codex login` once, then prepare the
Expand All @@ -278,14 +291,14 @@ separately fingerprinted protocol:
uv run --extra benchmark python -m benchmarks.locomo prepare \
--dataset /absolute/path/locomo10.json \
--tier smoke \
--protocol full-v30-codex-subscription \
--protocol full-v31-codex-subscription \
--output .benchmark-runs/locomo-codex-smoke
```

The v30 prompts, schemas, tool loop, call limits, judge rubric, and scoring stay
The v31 prompts, schemas, tool loop, call limits, judge rubric, and scoring stay
the same. The provider controls do not: Codex pins `gpt-5.6-luna`, reasoning
effort `high`, and temperature `null`. Therefore this is an experimental
provider variant, not a canonical v30 score.
provider variant, not a canonical v31 score.

Each model call uses a fresh ephemeral thread, an empty temporary directory,
read-only/no-network sandboxing, and deny-all approvals. It receives no custom
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/locomo/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""The pinned RS-LoCoMo-Full-v30 benchmark adapter."""
"""The pinned RS-LoCoMo-Full-v31 benchmark adapter."""
2 changes: 1 addition & 1 deletion benchmarks/locomo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
prog="python -m benchmarks.locomo",
description=(
"RS-LoCoMo-Full-v30: prepare is local; ingest/answer/judge require "
"RS-LoCoMo-Full-v31: prepare is local; ingest/answer/judge require "
"explicit execution acknowledgements"
),
)
Expand Down
14 changes: 7 additions & 7 deletions benchmarks/locomo/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Typed values for the full-system RS-LoCoMo-Full-v30 protocol."""
"""Typed values for the full-system RS-LoCoMo-Full-v31 protocol."""

from __future__ import annotations

Expand Down Expand Up @@ -33,12 +33,12 @@
RetainedCategory = Literal[1, 2, 3, 4]
Tier = Literal["smoke", "development", "publication"]
ProtocolKey = Literal[
"full-v30", "full-v30-gemma-vertex", "full-v30-codex-subscription"
"full-v31", "full-v31-gemma-vertex", "full-v31-codex-subscription"
]
ProtocolName = Literal[
"RS-LoCoMo-Full-v30",
"RS-LoCoMo-Full-v30-GemmaVertex",
"RS-LoCoMo-Full-v30-CodexSubscription",
"RS-LoCoMo-Full-v31",
"RS-LoCoMo-Full-v31-GemmaVertex",
"RS-LoCoMo-Full-v31-CodexSubscription",
]
SourceTimezoneBasis = Literal["assumed_utc"]
AnswerAgentModel = Literal[
Expand Down Expand Up @@ -135,7 +135,7 @@ class QuestionManifest(FrozenModel):
class RunConfiguration(FrozenModel):
"""Immutable identity of one prepared benchmark run."""

protocol_name: ProtocolName = "RS-LoCoMo-Full-v30"
protocol_name: ProtocolName = "RS-LoCoMo-Full-v31"
adapter_version: NonEmpty
prepared_at: datetime
repository_revision: NonEmpty
Expand Down Expand Up @@ -486,7 +486,7 @@ class SessionDiagnosticSummary(FrozenModel):
class RunSummary(FrozenModel):
"""Publication-ready local aggregate with no hidden denominator."""

protocol_name: ProtocolName = "RS-LoCoMo-Full-v30"
protocol_name: ProtocolName = "RS-LoCoMo-Full-v31"
protocol_fingerprint: NonEmpty
tier: Tier
questions: int = Field(ge=1)
Expand Down
57 changes: 34 additions & 23 deletions benchmarks/locomo/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,18 @@
from rememberstack.model import ReasoningEffort
from rememberstack.model import ToolDescriptor

PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v30"
DEFAULT_PROTOCOL_KEY: Final = "full-v30"
ADAPTER_VERSION: Final = "locomo-full-adapter-2026.09-concise-adjudication-v30"
PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v31"
DEFAULT_PROTOCOL_KEY: Final = "full-v31"
ADAPTER_VERSION: Final = "locomo-full-adapter-2026.09-document-context-v31"
"""Adapter identity for Full-v31: D122/D123 on the D119–D121 processing contract."""
MAX_TOOL_CALLS: Final = 8
MAX_AGENT_CALLS: Final = 9
ANSWER_READER_RETRY_BUDGET: Final = 2
API_TIMEOUT_SECONDS: Final = 60.0
"""Transport budget for compound retrieval, larger than the server DB budget."""
EXPECTED_DOCUMENT_BINDING_GENERATION: Final = "document-t0-v1"
EXPECTED_PROMPT_RENDERER_VERSION: Final = "concise-handles-2"
"""Concise adjudication projector/response-adapter generation (D121/D123)."""

EXPECTED_SURFACE_MANIFEST_HASH: Final = (
"d8be43966d90048ce3fc8ffe6dfdfc7943999fbf4f018ac2eb7998f2c995aae2"
Expand All @@ -54,13 +57,20 @@
"chunk",
"embed_chunk",
"extract_claims",
"ground_claims",
"normalize_relations",
"adjudicate_observations",
"adjudicate_supersession",
"embed_claim",
"reconcile",
"label_relation",
)
_E2_EXTRACTOR_GENERATION: Final = (
"e2-extract-2026.09:d119-multi-span-1:d80-location-elements-1:"
"token-union-grounding-1:temporal-anchor-4:d107-kind-vocabulary-1:"
"d79-section-orientation-v1:max-chars2048:target-first:unicode-ellipsis:"
"assertion-clarity-4:d122-source-references-1"
)
EXPECTED_INGEST_COMPONENT_VERSIONS: Final[Mapping[str, str]] = MappingProxyType(
{
"convert": "e0-convert-2026.08",
Expand All @@ -70,19 +80,19 @@
"blockizer-heading-metadata"
),
"embed_chunk": "e1-embed-2026.08-d80",
"extract_claims": (
"e2-extract-2026.09:d119-multi-span-1:d80-location-elements-1:"
"token-union-grounding-1:temporal-anchor-4:d107-kind-vocabulary-1:"
"d79-section-orientation-v1:max-chars2048:target-first:unicode-ellipsis:"
"assertion-clarity-4"
),
"extract_claims": _E2_EXTRACTOR_GENERATION,
"ground_claims": _E2_EXTRACTOR_GENERATION,
"normalize_relations": (
"e3-normalize-2026.09f:temp0-1:claim-fanout-1:bare-noun-1:"
"no-types-1:binary-t4-1:document-t0-1:mutable-window-1:"
"assertion-clarity-3"
"assertion-clarity-3:d123-context-refs-2"
),
"adjudicate_observations": (
"e3-obs-flush:entity-fanout-1:e3-normalize-2026.09f:temp0-1:claim-fanout-1:bare-noun-1:no-types-1:binary-t4-1:document-t0-1:mutable-window-1:assertion-clarity-3:relation-adjudicator-2026.09d:concise-handles-5:obs-adjudicator-2026.09d:concise-handles-5"
"e3-obs-flush:entity-fanout-1:e3-normalize-2026.09f:temp0-1:"
"claim-fanout-1:bare-noun-1:no-types-1:binary-t4-1:document-t0-1:"
"mutable-window-1:assertion-clarity-3:d123-context-refs-2:"
"relation-adjudicator-2026.09d:concise-handles-5:d123-context-nom-2:"
"obs-adjudicator-2026.09d:concise-handles-5:d123-context-nom-2"
),
"adjudicate_supersession": "fact-followup-2026.09:mutable-window-1",
"embed_claim": "p1-embed-claims-2026.07",
Expand Down Expand Up @@ -118,21 +128,22 @@
JUDGE_MODEL: Final = "openai/gpt-5.6-luna"
JUDGE_REASONING_EFFORT: Final = "none"
TEMPERATURE: Final = 0.0
GEMMA_VERTEX_PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v30-GemmaVertex"
GEMMA_VERTEX_PROTOCOL_KEY: Final = "full-v30-gemma-vertex"
GEMMA_VERTEX_PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v31-GemmaVertex"
GEMMA_VERTEX_PROTOCOL_KEY: Final = "full-v31-gemma-vertex"
GEMMA_VERTEX_ANSWER_AGENT_MODEL: Final = "google/gemma-4-26b-a4b-it-maas"
"""Gemma 4 26B-A4B IT served by Google as a managed open model (MaaS).

The variant protocol keeps every v30 pin -- ingestion bindings, prompts,
tool catalog, budgets, judge -- and swaps only the answer agent to this model
on Vertex, with thinking deliberately pinned off and the answer step pinned as
`DiscriminatedAnswerAgentStep`, the
same decision in a two-branch JSON shape that Vertex's order-enforcing
decoder completes. Scores are therefore an answer-agent comparison over the
same stores, not a new benchmark identity.
The variant is reader-only. It keeps every canonical v31 ingest pin --
pipeline stages including ground_claims, component generations, model
bindings, prompts, tool catalog, budgets, and judge -- and swaps only the
answer agent to this model on Vertex, with thinking deliberately pinned off
and the answer step pinned as `DiscriminatedAnswerAgentStep`, the same
decision in a two-branch JSON shape that Vertex's order-enforcing decoder
completes. It does not configure processing. Scores are therefore an
answer-agent comparison over the same stores, not a new benchmark identity.
"""
CODEX_SUBSCRIPTION_PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v30-CodexSubscription"
CODEX_SUBSCRIPTION_PROTOCOL_KEY: Final = "full-v30-codex-subscription"
CODEX_SUBSCRIPTION_PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v31-CodexSubscription"
CODEX_SUBSCRIPTION_PROTOCOL_KEY: Final = "full-v31-codex-subscription"
CODEX_SUBSCRIPTION_MODEL: Final = "gpt-5.6-luna"
CODEX_SUBSCRIPTION_REASONING_EFFORT: Final = "high"

Expand Down Expand Up @@ -269,7 +280,7 @@ class LoCoMoProtocol:


_FULL_V25 = LoCoMoProtocol(
key="full-v30",
key="full-v31",
name=PROTOCOL_NAME,
answer_agent_model=ANSWER_AGENT_MODEL,
judge_model=JUDGE_MODEL,
Expand Down
10 changes: 5 additions & 5 deletions benchmarks/locomo/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def ingest_sample(
_require_current_ingest_bindings(model_bindings=build.model_bindings)
if build.document_binding_generation != EXPECTED_DOCUMENT_BINDING_GENERATION:
raise ExecutionGuardError(
"deployment document binding generation differs from RS-LoCoMo-Full-v30"
"deployment document binding generation differs from RS-LoCoMo-Full-v31"
)
_require_current_query_surface(context=context, client=client)
_require_exact_live_ingests(
Expand Down Expand Up @@ -587,7 +587,7 @@ def answer_sample(
):
raise ExecutionGuardError(
"the deployment did not report the exact completed"
" RS-LoCoMo-Full-v30 pipeline, live graph, and fresh P3 projection"
" RS-LoCoMo-Full-v31 pipeline, live graph, and fresh P3 projection"
)
_require_serving_revision(context=context, readiness=readiness)
prior_readiness = context.state.readiness.get(sample_id)
Expand Down Expand Up @@ -1211,7 +1211,7 @@ def _validate_run(
"""Recompute immutable run identity before any local or remote stage."""
selected_protocol = protocol_for_name(configuration.protocol_name)
if configuration.dataset_sha256 != DATASET_SHA256:
raise BenchmarkRunError("run dataset hash is not RS-LoCoMo-Full-v30")
raise BenchmarkRunError("run dataset hash is not RS-LoCoMo-Full-v31")
if item_ids_hash(item_ids=manifest.item_ids) != manifest.item_ids_sha256:
raise BenchmarkRunError("run manifest item hash changed")
if manifest_bytes_hash(manifest=manifest) != configuration.manifest_sha256:
Expand All @@ -1221,7 +1221,7 @@ def _validate_run(
if manifest.tier != configuration.tier:
raise BenchmarkRunError("run manifest tier changed")
if configuration.dataset_commit != DATASET_COMMIT:
raise BenchmarkRunError("run dataset commit is not RS-LoCoMo-Full-v30")
raise BenchmarkRunError("run dataset commit is not RS-LoCoMo-Full-v31")
if configuration.adapter_version != ADAPTER_VERSION:
raise BenchmarkRunError("run adapter version differs from current code")
if _models_hash(values=documents) != configuration.documents_sha256:
Expand Down Expand Up @@ -1479,7 +1479,7 @@ def _require_current_ingest_bindings(*, model_bindings: dict[str, str]) -> None:
if model_bindings.get(name) != expected.get(name)
)
raise ExecutionGuardError(
"deployment ingest model bindings differ from RS-LoCoMo-Full-v30: "
"deployment ingest model bindings differ from RS-LoCoMo-Full-v31: "
+ ", ".join(mismatches)
)

Expand Down
Loading
Loading