Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
e1c8538
docs: retain retrieval v2 delivery contracts and frontier
Igloczek Sep 5, 2026
79b3412
feat(eval): pin retrieval corpus and capture native evidence
Igloczek Sep 5, 2026
8bcc36a
feat(eval): validate Luna low retrieval chat contracts
Igloczek Sep 5, 2026
de522f4
cezar autosave (run finalize)
Igloczek Sep 5, 2026
b6fdadd
fix(eval): isolate QMD storage and map stock excerpt URLs
Igloczek Sep 5, 2026
992bffa
fix(eval): reject excerpts that split Unicode code points
Igloczek Sep 5, 2026
9a63616
feat(eval): summarize query metrics with explicit denominators
Igloczek Sep 5, 2026
e7a6f1d
Join frozen evaluation observations into reproducible comparisons
Igloczek Sep 5, 2026
af11bfb
Allow explicit agent evaluation under revised delivery contract
Igloczek Sep 5, 2026
672671f
Remove superseded human-only report blockers
Igloczek Sep 5, 2026
75ec823
Apply reviewed evidence adjudication to immutable evaluation runs
Igloczek Sep 5, 2026
64372a9
Record adjudicated baseline and tokenizer boundary evidence
Igloczek Sep 5, 2026
7c9209f
Make full QMD quality the explicit retrieval release target
Igloczek Sep 5, 2026
4200d4c
Add bundled token counts and lossless wrapped input budgets
Igloczek Sep 5, 2026
186743e
Fix nonmonotone token splitting and whitespace joins
Igloczek Sep 5, 2026
e67213a
Bound serialized chat requests with measured capacity evidence
Igloczek Sep 5, 2026
8691644
Finalize retrieval tokenizer and metadata budget contracts
Igloczek Sep 5, 2026
ef22b0d
Document native excerpt and candidate-window evaluation
Igloczek Sep 5, 2026
7852021
Correct adjudicated review provenance in evidence reference
Igloczek Sep 5, 2026
ebe94cf
Complete retrieval foundation timing and reproduction evidence
Igloczek Sep 5, 2026
88529be
Redirect retrieval v2 to BGE-M3 and limit QMD evaluation
Igloczek Sep 5, 2026
824ed1c
Format saved retrieval evaluation tables
Igloczek Sep 5, 2026
6dd482b
Specify approved Qwen BM25 and dedicated rerank direction
Igloczek Sep 5, 2026
9b53082
Define measured Qwen and Voyage request contracts
Igloczek Sep 5, 2026
50a2781
Detail lossless preparation and prepared BM25 integration
Igloczek Sep 5, 2026
1ff2724
Implement lossless Qwen preparation and prepared BM25 retrieval
Igloczek Sep 5, 2026
cb18a07
Preserve UTF-8 BOM in lossless source snapshots
Igloczek Sep 5, 2026
ffbb882
Recognize Markdown syntax after a preserved BOM
Igloczek Sep 5, 2026
ea684fc
Specify protected hybrid fusion and search deadlines
Igloczek Sep 5, 2026
1bf6c98
Protect hybrid candidates and bound search execution
Igloczek Sep 5, 2026
8d52b0b
Restore required Luna expansion with verified typed contract
Igloczek Sep 6, 2026
e44de0b
Integrate Luna typed expansion with protected hybrid retrieval
Igloczek Sep 6, 2026
b798c96
Preserve maximal version and signed quantity literals in expansion
Igloczek Sep 6, 2026
23cbf31
Separate code literal spans from punctuation-aware quantity guards
Igloczek Sep 6, 2026
c1edd26
Protect complete colon-qualified expansion literals
Igloczek Sep 6, 2026
915d610
Keep numeric-bearing query literals whole during expansion
Igloczek Sep 6, 2026
c04eaa0
Detail Voyage reranking and source excerpt integration
Igloczek Sep 6, 2026
115768c
Rerank complete passages and return calibrated source excerpts
Igloczek Sep 6, 2026
c2a2e04
Detail development comparison before held-out evaluation
Igloczek Sep 6, 2026
9477235
Specify offline proposal replay before comparative scoring
Igloczek Sep 6, 2026
0593a2a
Specify shared evidence-unit adjudication for development metrics
Igloczek Sep 6, 2026
4d43a8b
Replay proposal retrieval against captured provider responses offline
Igloczek Sep 6, 2026
6db18a1
Detail shared-input ablation and Polish development checks
Igloczek Sep 6, 2026
b0567d6
Add shared-input retrieval ablation evaluator
Igloczek Sep 6, 2026
807762d
Detail common evidence review for controlled ablations
Igloczek Sep 6, 2026
0003fe5
Specify canonical evidence accounting for common evaluation
Igloczek Sep 6, 2026
eea97f7
Score shared source evidence with validated canonical units
Igloczek Sep 6, 2026
d6c379d
Detail missing status provenance before retrieval freeze
Igloczek Sep 6, 2026
074cb47
Expose snapshot and lexical profiles in status
Igloczek Sep 6, 2026
b8edeab
Record development comparison and detail locked evaluation
Igloczek Sep 6, 2026
827b4c1
Add custody-bound single-pass evaluation and request observations
Igloczek Sep 6, 2026
f49ff85
Preserve transport behavior and interrupted evaluation claims
Igloczek Sep 6, 2026
739ce6a
Specify frozen QMD data with persistent query caches
Igloczek Sep 6, 2026
461fb6d
Isolate QMD query caches from frozen evaluation content
Igloczek Sep 6, 2026
5c17ebc
Freeze held-out retrieval configuration and numerical release gates
Igloczek Sep 6, 2026
f8e1551
Record held-out collection interruption and supplemental protocol
Igloczek Sep 6, 2026
7f96839
Compact tokenizer assets and remove machine-specific evaluation bulk
Igloczek Sep 6, 2026
ed7ebf2
Specify compact offline benchmark publication
Igloczek Sep 6, 2026
32b639d
Publish compact retrieval benchmark and offline replay
Igloczek Sep 6, 2026
a005a46
Replace retrieval task specs with maintained reference docs
Igloczek Sep 6, 2026
90fbb44
Remove superseded retrieval briefs and research notes
Igloczek Sep 6, 2026
005b7a2
Acquire generated tokenizer and benchmark assets outside Git
Igloczek Sep 6, 2026
2d61ed3
Record license decisions and generate distribution notices
Igloczek Sep 6, 2026
47d3113
Include generated notices in CI release artifacts
Igloczek Sep 6, 2026
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: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Install build headers and pinned dependencies
run: |
sudo apt-get update
Expand All @@ -27,7 +28,7 @@ jobs:
python3 scripts/qa-terminal.py
python3 scripts/qa-clean.py
- name: Package executable with its permissions
run: tar -C dist -czf dist/iglo.mem-linux-x64.tar.gz iglo.mem
run: tar -C dist -czf dist/iglo.mem-linux-x64.tar.gz iglo.mem THIRD_PARTY_NOTICES.txt
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
path: dist/iglo.mem-linux-x64.tar.gz
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ dist/
# Local task state and execution evidence, not maintained project documentation.
.ai/work/
.ai/cezar/

# Pinned inputs acquired for builds and optional benchmark replay.
/assets/tokenizers/qwen3-embedding/*.json
/.cache/
4 changes: 3 additions & 1 deletion .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
".ai/**",
".agent/**",
"PRD.md",
"bun.lock"
"bun.lock",
"assets/tokenizers/**/*.json",
".cache/**"
]
}
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ committed snapshot can also be searched as-is. Each worktree has its own index.
Concurrent preparation, loading and GC coordinate with a five-second lock wait;
a stopped process releases its lock through the OS.

`status` reports prepared counts and missing referenced vectors without reading
`status` reports the snapshot schema, lexical and embedding profiles, prepared
counts and missing referenced vectors without reading
sources or calling OpenRouter. Corrupt present data is an error. `gc` requires
valid metadata and all referenced vectors before deleting anything. It does not
use Markdown changes to decide which vectors to keep.
Expand Down Expand Up @@ -132,8 +133,17 @@ sh scripts/build.sh
python3 scripts/qa-terminal.py
```

Build and check scripts prepare the pinned tokenizer JSON in an ignored local
cache. The first run downloads about 11.43 MB of tokenizer data from Hugging Face;
later runs verify the cache and work offline. Downloads are hash-checked before
publication. The standalone executable embeds this data and never downloads a
tokenizer at runtime. Before direct `bun test` or source development, run
`bun run tokenizers` once. Keep the generated cache for offline builds.

On Linux the default header location is `/usr/include/node`; override
`NODE_INCLUDE_DIR` if needed. Run the resulting `dist/iglo.mem` from your worktree.
`NODE_INCLUDE_DIR` if needed. Run the resulting `dist/iglo.mem` from your worktree. Distribute it with generated
`dist/THIRD_PARTY_NOTICES.txt`; see the [license record](docs/third-party.md).
Builds also need Git and the pinned notice-archive commit available.
For source development use the absolute path to `scripts/run.sh`. The supported
launcher and compiled build disable repository dotenv and Bun preload loading.
Do not use bare `bun src/cli.ts` from an untrusted repository.
Expand Down
19 changes: 19 additions & 0 deletions assets/tokenizers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Tokenizer notices and generated cache

`qwen3-embedding/tokenizer.json` and `tokenizer_config.json` are from
Qwen/Qwen3-Embedding-8B revision `1d8ad4ca9b3dd8059ad90a75d4983776a23d44af`:
https://huggingface.co/Qwen/Qwen3-Embedding-8B/tree/1d8ad4ca9b3dd8059ad90a75d4983776a23d44af

The JSON files are generated by `bun run tokenizers`, ignored by Git and
excluded from formatting. Build and check scripts prepare them automatically.
Missing or corrupt files are downloaded from this pinned revision, checked
against upstream hashes, compacted without changing parsed data, checked against
compact hashes, then atomically published. Valid cached files need no network.
The executable embeds them through static imports; it does no runtime fetching.
Upstream and compact SHA-256 hashes are recorded in
`docs/retrieval-contracts.md`. This is tokenizer data, not model
weights. The same licensed vocabulary is reused with a different postprocessor
for the pinned Voyage counting profile; no second vocabulary is bundled.

License decisions and generated distribution notices are documented in
[the third-party record](../../docs/third-party.md).
10 changes: 10 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 110 additions & 0 deletions docs/evaluation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Retrieval evaluation

Start with [held-out results](retrieval-v2-heldout.md) and the
[offline replay bundle](retrieval-v2-final/README.md). The original release
decision is `NO_ROLLOUT`; supplemental quality results do not replace it.
[Development comparisons](retrieval-v2-development.md) explain calibration,
expansion ablations and limited bilingual coverage. [Frozen release gates](retrieval-v2-release-gates.md)
record the acceptance values chosen before held-out access.

## Corpus and reproduction

[corpus.json](corpus.json) freezes 34 documents (485,578 original bytes): four
iglo.mem design/usage documents, all 21 Fastify Reference Markdown documents,
and all nine uv project-concept documents. Whole directories provide distractors
without selecting for observed retrieval wins. Fastify Server.md supplies a natural
long document. The collections include tables, fences, API names and error codes.
Path mapping is `.agent/knowledge/<original path>` within separate project roots;
the manifest itself is the reverse map. No complete source corpus or models are committed. The final benchmark bundle
contains only reviewed evidence excerpts.

The manifest records immutable upstream commits, original byte hashes and hashes
of UTF-8 text after CRLF/CR normalization to LF. Invalid UTF-8 is rejected. Upstream
license files are checked and copied into the materialized corpus directory.
See [the license record](../third-party.md). The iglo.mem comparator pin has no
license file; its user-owned material is used locally and must not be redistributed
as an externally licensed corpus. No source acquisition changes this status.

Use Bun 1.4.2 and Git. Clone the three URLs in the manifest into evaluation storage
outside tracked files. Create this config, substituting absolute local paths:

```json
{
"manifest": "/repo/docs/evaluation/corpus.json",
"corpusRoot": "/evaluation/corpus",
"checkouts": {
"iglo": "/checkout/iglo.memory",
"fastify": "/checkout/fastify",
"uv": "/checkout/uv"
}
}
```

```sh
bun scripts/retrieval-eval/cli.ts materialize /evaluation/materialize.json
```

The destination must not exist. All committed blobs and notices are checked before
writing. Partial destinations are retained for diagnosis; choose a new empty path.
Do not modify the frozen sources for reuse experiments: use another materialization.

## Labels and immutable observations

The published benchmark has 80 reviewed questions, split 30 development / 50
held-out. Question families stay in one split. Two independent agent reviews and
explicit adjudication replace manual review under the user's instruction.
Grades are 0 for no answer support, 1 for partial support and 2 for directly useful
evidence. Answerability, supported facets and misleading output are separate.
Topical background on an unsupported question does not become positive answer
evidence. Preserve disagreements and corrections rather than changing the
question contract after observing results.

Native captures are hash-bound to corpus, questions, executable/model inputs and
cache regime. Failures and interrupted claims remain recorded; changed inputs
require a new run. A failed request's unknown usage never becomes zero merely
because a retry succeeds. The original eight proposal searches and 42 evaluator
skips remain separate from the supplemental 42 actual searches.

## Common evidence metrics

`common.ts` validates canonical source units, legacy bindings and exact displayed
renderings. Each unit has a question-local ID, minimal source span, target grade,
facets and explicit proposition. Shifted windows expressing the same proposition
at the same locus share a unit; distinct source loci remain separate. Bundled
excerpts can credit multiple units. Identity needs semantic review, not automatic
merging by coordinate overlap.

Renderings retain displayed grade, facets, misleading judgment and exact supporting
quote. Per-unit achieved grades cannot exceed targets. An explicitly reviewed
shorter quote can support a unit without widening its displayed span. Validate
source ownership, Unicode code-point coordinates, frozen hashes and known IDs.
Unknown renderings remain unresolved, not automatically irrelevant.

Useful@1/3/5/8 means at least one grade-2 displayed excerpt, independent of novelty.
Facet recall unions supported facets. Pooled span recall counts each unit once
when achieved grade reaches its target; it is not exhaustive corpus recall.
`unit-novelty-ndcg-v1` uses gains 0/1/3: each rank gains the maximum positive
increase among credited units, then updates all their achieved gains. The ideal
is the first eight sorted unit target gains. Partial then direct support therefore
contributes 1 then 2, while duplicates contribute nothing new. This convention
can penalize bundled evidence relative to separate ideal units; it is not standard
document nDCG. All compared systems share the same reviewed unit pool.

Failed answerable searches score zero with failure retained. Failed unsupported
searches are not successful abstentions. Comparisons average repetitions per
question, use paired question bootstrap intervals and retain missing counts.
The final replay pins the frozen seed, 2000 samples and 95% intervals.

## Maintenance checks

```sh
bun test test/retrieval-publication.test.ts test/retrieval-common.test.ts
bun scripts/retrieval-eval/restore-publication.ts
bun scripts/retrieval-eval/replay-publication.ts .cache/retrieval-v2-benchmark /evaluation/corpus
```

The replay requires only local materialized sources. It makes no inference calls.
Run `sh scripts/check.sh` for changed evaluation code. Do not repeat provider or
QMD runs for documentation edits. Frozen native stdout, machine bindings and
run logs stay outside tracked files; published data and hashes support offline
metric reproduction, not independent authentication of omitted provider responses.
Loading