You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Section indexing and range reads (SPEC-47 component 1) #1403
Part of the POSIX tool surface + memory evals tracker.
Scope
SPEC-47 component 1 — the highest-leverage piece: parser-level section indexing plus range reads, so cat --section and max_tokens-bounded reads become real.
Requirements (from SPEC-47)
Parser tracks heading boundaries: NoteSection with heading text/level/path, start/end line and byte offsets, duplicate index. A section ends at the next heading of same-or-higher level.
note_sections table indexed by (entity_id, heading_path), backfilled on sync; sections are an index into the file, content is not duplicated.
API: GET /notes/{id} gains section=, lines=, max_tokens= (truncate at section/paragraph boundaries, explicit ellipsis marker); raw content endpoints gain HTTP Range → 206 Partial Content.
MCP: the POSIX cat tool's section/max_tokens params go live; existing read_note may gain the same pass-throughs.
Free wins to wire once the index exists: schema required_sections validation, memory://note#section deep links, section-aware search snippets.
Measurement
Re-run the agent-task and xAFS evals after landing: the token delta vs full-note reads is the SPEC-47 headline claim (competitors report 80%+ savings from partial reads). The manual project (40 rigidly-sectioned man pages) is the canonical demo corpus: cat man3/write-note-3 --section SYNOPSIS ≈ 100 tokens vs ~1,500 full-page.
Acceptance
Section boundaries indexed and backfilled; migration included.
section=, lines=, max_tokens= behave per spec with disambiguation for duplicate headings.
Eval re-run shows the measured token delta in the tracker.
Component: Core / parser / sync (markdown parsing, note_sections indexing, migration), API (GET /notes/{id} range/section params, HTTP Range support), MCP (cat/read_note pass-throughs). Not cloud-specific — no cloud label applied.
Priority: High — this is called out as "the highest-leverage piece" of SPEC-47 and is a prerequisite for the token-savings claims (cat --section, max_tokens-bounded reads) that the rest of the POSIX tool surface work depends on.
Complexity: Complex — touches multiple layers: markdown parser (heading-boundary tracking, NoteSection model), a new indexed table with an Alembic migration and sync backfill, API surface changes (query params + 206 Partial Content range handling), and MCP tool wiring, plus an eval re-run to validate the token-delta claim.
Relationship: Sub-component of the SPEC-47 tracker (#1398 — "POSIX tool surface and memory evals"), not a duplicate. No other duplicate or overlapping open issue found via search.
Notes for follow-up: The issue references SPEC-47 but no SPEC-47* doc currently exists in-repo (docs/specs/ or similar) — worth confirming the spec doc is landed/linked before implementation starts, since acceptance criteria here (duplicate-heading disambiguation, truncation boundary rules, deep-link format) depend on it being authoritative.
Activity
claude commentedon Aug 31, 2026
Claude finished @phernandez's task in 28s —— View job
Triage
Type: Enhancement (feature request) — labeled
enhancement.Component: Core / parser / sync (markdown parsing,
note_sectionsindexing, migration), API (GET /notes/{id}range/section params, HTTPRangesupport), MCP (cat/read_notepass-throughs). Not cloud-specific — nocloudlabel applied.Priority: High — this is called out as "the highest-leverage piece" of SPEC-47 and is a prerequisite for the token-savings claims (
cat --section,max_tokens-bounded reads) that the rest of the POSIX tool surface work depends on.Complexity: Complex — touches multiple layers: markdown parser (heading-boundary tracking,
NoteSectionmodel), a new indexed table with an Alembic migration and sync backfill, API surface changes (query params +206 Partial Contentrange handling), and MCP tool wiring, plus an eval re-run to validate the token-delta claim.Relationship: Sub-component of the SPEC-47 tracker (#1398 — "POSIX tool surface and memory evals"), not a duplicate. No other duplicate or overlapping open issue found via search.
Notes for follow-up: The issue references SPEC-47 but no
SPEC-47*doc currently exists in-repo (docs/specs/or similar) — worth confirming the spec doc is landed/linked before implementation starts, since acceptance criteria here (duplicate-heading disambiguation, truncation boundary rules, deep-link format) depend on it being authoritative.