Repository navigation
Description
Audit lineage
Parent: #128
Cluster: C20
Audit IDs: F38
Reviewed HEAD: eeb9e8f2b0435ac07e3f00f91ea1eb24176df4b3
Priority: P2 (scope-specific proposed implementation priority, not a retroactive finding severity).
Evidence
Current observed problem
- F38 — confirmed: SQL/record construction / ParsedFile return; isolated DB with s1/project-a and s2/project-b yields one ParsedFile with 3 records, Cwd empty and UUID empty; SQL scans sessionID but never uses it. project fallback uses database pathname. | Single-file record API drops native session ownership; project falls back to DB pathname. LoadToolSequences groups by source_path (queries.go:1079), not native session_id. No exact duplicate. | Introduce explicit per-record/session identity and project metadata or a multi-session parse contract before changing grouping; ingest native session directory and IDs, test two sessions/projects in one DB and stable UUIDs across mutations.
Expected contract / decision gate
Two sessions/projects in one source database remain distinct in list/search/sequences with stable proven native identities; updates preserve session ownership.
Decision/blocker: D16: per-record/session metadata versus multi-session reader API; no invented UUIDs or path-only grouping.
Scoped acceptance criteria
- Two sessions/projects in one source database remain distinct in list/search/sequences with stable proven native identities.
- updates preserve session ownership.
Required validation / smoke
Use current-HEAD source/LSP callers and narrowly affected behavior tests. Reproduce the linked report probes using /tmp fixtures with scrubbed HOME and BACKSCROLL_CONFIG_DIR; observe exit code, stdout/stderr and SQLite/file state, including negative controls. Tests must exercise behavior, not source-text assertions. Implementation must later pass the normal repository gate without weakening coverage; issue materialization itself runs no builds/tests.
Dependencies and duplicate reconciliation
All-state issue inventory is searched immediately before creation; related closed history is not proof that these current observations are fixed. True cross-batch overlaps are owned by this one cluster, not an issue per ID.
Non-goals / safety boundaries
Do not change native origin/identity evidence, reasoning privacy, tokenizer/echo eligibility, perennial retention, historical migrations, or owner/follower/remediation locking merely to deduplicate code. Do not alter #128–#136 closure/tracker state as part of implementation.
Activity
pablontiv commentedon Oct 17, 2026
Contexto y evidencia
Derivado de #198 y pablontiv/homeserver#485. Fuente cotejada en
main, HEADf280884a359f88e0e71bef48d69b0a1052d6fa30. Las mediciones siguientes ya fueron ejecutadas en la investigación; este triage no ejecuta builds ni modifica el índice. Evidencia local (no adjunta ni pública):/tmp/backscroll-485-handoff/reports/. Solo se publican conteos, comandos y referencias de código.Evidencia adicional L6
lim-uniform-metric.md:125-218: los 32.640 registros OpenCode comparten un único source_path y tienen UUID NULL. El parche/reingesta aislados recuperaron 429 sesiones nativas distintas, sin UUID NULL. No se publican identidades ni contenido.Cotejo actual:
internal/readers/opencode_reader.go:176-183construye texto sin UUID;:201-209escanea sessionID sin preservarlo en los mensajes. Las líneas históricas de #159 se desplazaron por el snapshot hash: el defecto sigue en la construcción actual. Parche experimental:/tmp/backscroll-485-handoff/opencode-session-identity.patch; no es integración ni reemplaza la decisión de identidad/proyecto de este issue. La ramapablontiv/ingestion-policyya contiene contrato de identidad nativa/V18, pero HEAD main inspeccionado mantiene el comportamiento anterior. Prueba esperada: varias sesiones en una fuente conservan identidad/atribución y no se colapsan al contar sesiones. Duplicado reconocido: este issue es el propietario, sin nuevo ticket.pablontiv commentedon Oct 20, 2026
Pregunta
Preserve native OpenCode per-record session and cwd ownership in canonical storage and session-scoped consumers.
BASIS
Issue159 real two-session SQLite fixture and429-session experiment plus retained native commits demonstrate runtime behavior. Port only native identity onto current snapshot/project proof and bounded fingerprint replay, append new migration after shippedV18, preserve unknown expired history.
REVIEW
TriageReview159
feat(opencode): preserve native session and project ownership per rec…