GeezerVison is showing github.com — impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) · Issue #7608 · developing-today/code
impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608DescriptionImplementation follow-on for the design recorded for #6053 (design doc: doc/2026-11-08T09-15-51Z_design_atlas_license_capture_ingest/ — PR linked from #6053; parent gate #6024; substrate #3125; detection survey #5979).
Scope
- Schema: add the
ingest_repo_provenance table to the atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 provenance registry exactly as designed (fields, PK (repo_id, ingest_generation), append-only). Migration + invariant tests for I1–I4 (PBT over the registry: generation monotonicity, D.6 flag derivation, SPDX parseability).
- Detection cascade at ingest: GitHub license API → licensee → ScanCode (notice files only) → manifest fields → manual, recording
detection_source, detection_evidence (notice file path + content hash), and detector_version per row. Every external ingest writes its provenance row in the same transaction window as its first chunks (I1).
- D.6 derivation:
d6_applicable computed from has_license_notice only (no/contested); yes remains unemitted until the research(licensing): may we ingest external GitHub comments/discussions into Atlas? — gate for the external corpus #6024 lawyer answer lands.
- Re-evaluation surface: implement the §5 latest-generation difference query against a versioned
policy_eval stub (zone/license/flag inputs), plus the tombstone-generation purge-candidate listing.
Acceptance
- Ingesting an external repo with a detectable license produces a provenance row whose SPDX expression, evidence hash, and zone match a hand-checked fixture set (incl. an escaped edge: unlicensed repo →
license_spdx NULL row, d6_applicable = no).
- A detector-version bump re-evaluates from recorded evidence without network fetches (test with network disabled).
- The policy difference query returns exactly the repos whose treatment changes between two rule versions on a fixture registry.
Design authority: the #6053 design record — deviations need a design note amendment, not a silent change.
Acceptance criteria
- Ingesting an external repo with a detectable license writes an
ingest_repo_provenance row (PK (repo_id, ingest_generation), append-only) in the same transaction window as its first chunks, with SPDX expression, evidence hash, and zone matching a hand-checked fixture set — including the escaped edge: unlicensed repo → license_spdx NULL row, d6_applicable = no.
- Invariant tests cover I1–I4 with named oracles (generation monotonicity, D.6 flag derivation from
has_license_notice only, SPDX parseability) — PBT over the registry where the invariants allow.
- A detector-version bump re-evaluates from recorded evidence with the network disabled (test proves it).
- The §5 latest-generation difference query against the versioned
policy_eval stub returns exactly the repos whose treatment changes between two rule versions on a fixture registry, and the tombstone-generation purge-candidate listing works.
Activityadded task/triageQueue packet kind: verify, reproduce, and route this item effort/lLarge: multi-day or open-ended; expect staged check-ins meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added on Nov 8, 2026dezren39 commented on Nov 8, 2026 Intake review
Related: design authority #6053 (deviations need a design-note amendment); parent gate #6024 (the lawyer answer that keeps d6_applicable = yes unemitted); substrate #3125; detection survey #5979.
Live check: implementation follow-on filed today from the landed #6053 design; the issue's own ## Acceptance section states this bar — this appended section consolidates it under the standard heading.
Notes / risks: the D.6 derivation is the legal-sensitivity heart: yes stays unemitted until #6024 lands, whatever the detection cascade finds. Append-only provenance is what makes re-evaluation without network possible — do not trade it away for a simpler update-in-place.
Suggested approach: schema + invariant tests first, then the detection cascade in the designed order (GitHub license API → licensee → ScanCode notice files → manifest fields → manual), then the re-evaluation surface.
— fleet monitor (repo-fleet-monitor), 2026-11-08 10:12 CST run: acceptance criteria appended to the body, labels normalized, meta/enriched applied. developing-today commented on Nov 9, 2026 ContributorAuthor More actions
🤖 Agent note · triage verdict — real and current
- Agent: repo queue worker, lane code-k (repo-worker-code)
- Session / ID: cron repo-queue-worker-shift-k run 2026-11-08; task 13740
- Task: task 13740 for issue impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608 (triage — impl(atlas): license capture at ingest, follow-on of design design(atlas): license capture at ingest — per-repo license + D.6 applicability flag in provenance #6053).
- Fresh verification (2026-11-09T01:2xZ): issue impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608 is OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit). No PR (open or closed) references impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608. On origin/main (50a3677, 2026-11-08)
ingest_repo_provenance appears ONLY in the design record doc/2026-11-08T09-15-51Z_design_atlas_license_capture_ingest/ — no implementation has landed.
- Gate/dependency states (fresh GraphQL via app token): design issue design(atlas): license capture at ingest — per-repo license + D.6 applicability flag in provenance #6053 CLOSED (design landed on main); substrate issue atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 OPEN (provenance registry — the fix adds its table to that registry, so the fix packet names atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 as its sequencing dependency); detection survey id: research: SPDX identifiers and license-detection tooling for the classifier #5979 OPEN; parent gate research(licensing): may we ingest external GitHub comments/discussions into Atlas? — gate for the external corpus #6024 OPEN — per impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608's own scope this does NOT block implementation:
d6_applicable is derived from has_license_notice only and yes stays unemitted until the research(licensing): may we ingest external GitHub comments/discussions into Atlas? — gate for the external corpus #6024 answer lands.
- Verdict: REAL-AND-CURRENT. Converting to a fix packet (dedupe repo-health:v1:fix:developing-today/code:issue:7608) scoped to impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608's scope/acceptance exactly as written, with the atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 substrate dependency named. This triage task completes as
triaged; issue impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608 itself stays open for the fix.
- Links: task 13740 · issue impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608 · design design(atlas): license capture at ingest — per-repo license + D.6 applicability flag in provenance #6053 · substrate atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 · gate research(licensing): may we ingest external GitHub comments/discussions into Atlas? — gate for the external corpus #6024
dezren39 commented on Nov 23, 2026 agent-note:v1
event: TRIAGE (queue task 18529) — the #3125 substrate block is DISCHARGED; implementation task 14253 unblocked and queued
by: agent felix (kind muse, Muse sandbox seat), under Drewry's scale-up directive
at: 2026-11-22
Fresh verification this pass (not trusting the 2026-11-16 bulk-intake premise):
- impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608 OPEN, implementation-shaped (scope + acceptance complete), no matching PR. GitHub code search for
ingest_repo_provenance returns only the design(atlas): license capture at ingest — per-repo license + D.6 applicability flag in provenance #6053 design doc (doc/2026-11-08T09-15-51Z_design_atlas_license_capture_ingest/) — the implementation exists nowhere yet. design(atlas): license capture at ingest — per-repo license + D.6 applicability flag in provenance #6053 (design) is CLOSED/done.
- Every prior park of this issue (tasks 14253, 18529) named one gate: atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 phase 1, the provenance registry, with phase-1 PR dezren39/hatch-personal#29 "awaiting merge". That PR was in fact unmergeable (diverged branch) and has been superseded: hatch-personal#58 MERGED 2026-11-23T03:16:43Z (merge commit c3a063e29) carrying the two phase-1 commits —
chunk_occurrences + cas_registry schema and occurrence-aware ingest in atlas-ingest.py — with phase-1 tests verified on hatch-personal main (4 passed) and fix(deps): update rust crate bacon to 2.14.0 #29 closed as superseded (record on atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 by lane-ci, 2026-11-22).
- atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 itself stays OPEN as the phases 2–4 programme tracker, but per the precedent recorded on atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 (task 16831), the gate clears for dependents once phase 1 is merged and verified landed. impl(atlas): license capture at ingest — provenance table, detection cascade, policy re-evaluation (follow-on of #6053) #7608's scope needs only the phase-1 registry + ingest path; phases 2–4 (CAS extracts, occurrence backfill) are not prerequisites. Parent gate research(licensing): may we ingest external GitHub comments/discussions into Atlas? — gate for the external corpus #6024 remains non-blocking exactly as the design states:
d6_applicable derives from has_license_notice only and yes stays unemitted until the research(licensing): may we ingest external GitHub comments/discussions into Atlas? — gate for the external corpus #6024 answer lands.
Routing: the scoped implementation packet already exists — queue task 14253 (repo-health-code-pilot). A fresh enqueue deduped onto it, so no duplicate was created. Task 14253 was blocked; I have unblocked it (status now queued) with the discharged-gate evidence, including a pointer to the earlier packet_defect flag (#5444, max_attempts mismatch) for the claiming lane to correct if it re-fires at claim time.
Verdict: REAL, CURRENT, and now UNBLOCKED. #7608 stays open as the implementation issue; the next lane draws task 14253. dezren39 commented on Nov 23, 2026
Released by felix (outcome: done). Triage complete (task 18529): #7608 is real and current (no ingest_repo_provenance implementation anywhere; #6053 design closed), and its long-standing block on #3125 phase 1 is discharged — the provenance registry landed via hatch-personal#58 (merged 2026-11-23T03:16:43Z, tests verified). The scoped implementation packet already existed as queue task 14253 (a fresh enqueue deduped onto it); felix unblocked it — now queued on repo-health-code-pilot. Record: issue comment 7090961511. dezren39 commented on Nov 23, 2026
Picked up by felix — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while felix posts progress markers; after 30 minutes of silence any other worker may pick this up.) dezren39 commented on Nov 23, 2026 agent-note:v1
event: CLAIMED for implementation (queue task 14253) — direct queue claim refused ("no claimable task", the flagged #5444 packet defect); claimed via fleet queue fallback claim under worker felix
by: agent felix lane (kind muse, Muse sandbox seat), under Drewry's scale-up directive
at: 2026-11-22
Venue note: the implementation lands in dezren39/hatch-personal (workspace/turso-atlas/), following the phase-1 precedent — the #3125 provenance registry this issue extends (chunk_occurrences + cas_registry in atlas.db, keeper scripts/atlas-ingest.py) lives there, and phase 1 landed as hatch-personal PR #58 for this same issue family. The design (§6) fixes the table as registry-resident under #3125, so the schema, cascade wiring, and re-evaluation surface go where the registry is; this issue stays the record in developing-today/code. dezren39 commented on Nov 23, 2026 agent-note:v1
event: IMPLEMENTED — PR open for Felix's review: dezren39/hatch-personal#59
by: agent felix lane (kind muse, Muse sandbox seat), queue task 14253 (fallback claim — direct claim refused on the #5444 packet defect, as flagged)
at: 2026-11-22
PR: https://github.com/dezren39/hatch-personal/pull/59 (branch felix/7608-license-capture, commit 447fe98ca2) — unmerged for Felix's review. Venue per the claim note: the #3125 registry lives in hatch-personal's turso-atlas (phase 1 = PR #58), so the implementation lands there.
What landed, against the acceptance criteria:
ingest_repo_provenance in atlas.db, exactly the design §2 field set, PK (repo_id, ingest_generation); append-only enforced by triggers (I3). Migration is the additive open_store schema, same idiom as phase 1.
- Detection cascade in new
scripts/atlas_license.py — pure, network-free, over recorded evidence bundles: GitHub license API → licensee (template match) → ScanCode (phrase match, notice files only) → manifest fields → manual; winner recorded per row, losers kept in detection_evidence; SPDX expression parser enforces I4 (garbage → LicenseRef-Unidentified, raw preserved). d6_applicable derived from has_license_notice only; yes never emitted (I2).
ingest-repo verb writes the provenance row in the same transaction as the repo's first chunks (I1), evidence bundle interned in cas_registry.
- §5 surface: versioned
policy_eval stub as a SQL function; policy-diff (latest-generation difference query), redetect (offline re-evaluation from recorded evidence; manual latest rows outrank), purge-candidates (tombstone generations).
Evidence: python3 -m unittest discover -s tests in workspace/turso-atlas — 19/19 OK on the laptop (amd-6, Python 3.14.8) from a clean clone of the branch, and 19/19 in the sandbox. Fixture set hand-checked: MIT via licensee; Apache-2.0 via API with the losing licensee answer in evidence; unlicensed repo → NULL-spdx row, d6_applicable = no; detector-bump re-evaluation proven with sockets rigged to raise. No new dependencies.
Design ambiguities found in contact with the code (judgment calls, also in the PR body):
- Found-nothing rows: the design leaves
detection_source non-nullable without pinning the NULL-spdx case. Convention: the rung that ran against the evidence (licensee for a tree scan; github_license_api for an API-only bundle).
- SPDX validation is grammar-level, not the full license list — a subset list would misclassify valid ids; the parser is the single place that changes if id: research: SPDX identifiers and license-detection tooling for the classifier #5979 lands a stricter format (§6).
- The BSD pair cannot be separated by phrase scoring (BSD-2's text is a clause-subset of BSD-3's); the ScanCode rung separates them by the endorsement clause explicitly.
dezren39 commented on Nov 23, 2026
Released by felix (outcome: done). Implemented #7608: ingest_repo_provenance + detection cascade + policy re-evaluation in hatch-personal turso-atlas; PR dezren39/hatch-personal#59 open for Felix's review; 19/19 tests green on amd-6 and in the sandbox. dezren39 commented on Nov 23, 2026 agent-note:v1
event: hatch-personal PR #59 MERGED — license capture at ingest is live on hatch-personal main
by: agent felix (kind muse, Muse sandbox seat), merging after review
at: 2026-11-22
Felix's review: re-ran the suite from the PR head in a clean worktree — 19/19 (unittest, stdlib only), matching the lane's two-venue record; read the schema enforcement — the provenance table is append-only by trigger (UPDATE and DELETE both RAISE(ABORT)), and the I2 oracle (d6_applicable 'yes' is never emitted; derived from has_license_notice only, pending the #6024 lawyer answer) is covered by named tests. The venue call stands as the lane recorded it: the registry this extends lives here in hatch-personal (phase 1, PR #58), and the design fixes the table as registry-resident — a second registry in the code repo would have been a store nothing opens.
#7608's implementation scope is complete. The remaining atlas programme (phases 2–4) stays with #3125 as its tracker.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|