Skip to content

Retire the hosted Supabase mirror and query_sources - #351

Merged
MaxGhenis merged 19 commits into
mainfrom
retire/supabase-mirror
Nov 15, 2026
Merged

MaxGhenis merged 19 commits into
mainfrom
retire/supabase-mirror

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Decision: retire, not fix

We could fix or retire the hosted Supabase mirror (chronicle load-supabase-mirror) and query_sources. Nothing needs either, and fixing them would mean building hosted infrastructure for a reader that does not exist. This PR retires both. It also deletes the Supabase client and the supabase dependency, whose only other callers chronicle#353 retired.

The evidence comes from read-only checks on 2026-10-12 against the project that the repository's POLICYENGINE_SUPABASE_URL variable names. docs/supabase-mirror-retirement.md records the details.

  1. Renames left both pointing at a schema nobody created. query_sources read microplex.sources in December 2025, and statement history shows its query shapes there. It moved to arch (2026-04-27), then ledger (2026-06-30). An Arch-era form of the loader filled nine arch tables with three builds on 2026-05-05. From the Ledger rename on, both defaulted to ledger, which the project did not have. A Data API request returned 406 PGRST106 Invalid schema: ledger, so every call with the default schema failed. No statement had ever named a ledger or chronicle schema (statement stats predate every application schema, nothing evicted), and none of the 34 applied migrations created one. Nobody committed the migration the docs cited (20260504_{arch,ledger,chronicle}_bronze.sql as the names changed).
  2. A schema setting could not give query_sources anything Chronicle builds. It read a sources table with jurisdiction and institution columns. Chronicle's DB build creates no such table (a test pins the build's table set), so a setting could only point it back at the Cosilico-era microplex.sources.
  3. Nothing read the hosted copy. The project held nine arch tables and no other mirror-shaped table. Statement statistics showed two kinds of read: the owner role's load-day verification and one audit count on 2026-10-12. No anon, authenticated or service_role read had touched them, and no view or function depended on them. In the 90 days of retained API logs (2026-07-15 to 2026-10-12), the Data API got 22 requests, none for a mirror table.
  4. No code consumed either. The 2026-10-12 search covered 1,797 local checkouts (default branch and HEAD) and 246 org repositories with no local clone (archived included). It covered non-default branches updated since December 2025 in 392 repositories, plus all 424 axiom-corpus branch tips (scanned locally after its fetch failed). It also ran GitHub code search over PolicyEngine, TheAxiomFoundation, CosilicoAI, ThesisInstitute and MaxGhenis. The retired names appeared only in Chronicle, its branches and its clones (one under an earlier name, arch-data). The other matches used the same search terms for unrelated things, or read a local SQLite file. No workflow runs the loader or reads the repository's Supabase variable or secret.

The client modules have no outside importer either. On 2026-10-12 the audit behind chronicle#353 searched 404 local clones of PolicyEngine, TheAxiomFoundation and CosilicoAI repositories for Python imports of chronicle, policyengine_chronicle and db.supabase_client, and found them only in Chronicle's own clones.

What main did first

chronicle#353 landed on 2026-11-11 and retired the legacy targets table with its half of the Supabase client: TARGETS_SCHEMA, query_targets, query_strata and insert_targets_batch. This branch had retired the other half, LEDGER_SCHEMA and query_sources. The two pull requests agreed that whichever landed second would delete the rest of the client, so this one does.

8811fc5d merges main at 4ce631f5. Git reported four conflicts, each in a file where the two sides had deleted different halves, and each resolution keeps both deletions:

  • db/supabase_client.py keeps neither schema constant and no query helper. SupabaseConfig and get_supabase_client survive the merge commit, because chronicle/client.py still imported them there.
  • tests/test_supabase_client.py keeps the five config tests and drops both sides' query tests.
  • tests/test_chronicle_namespace.py keeps main's coverage-helper test and drops both schema-constant assertions.
  • docs/architecture.md takes this branch's "Relational Artifact" paragraph over main's hosted-schema table.

README.md, chronicle/harness.py, docs/agent-source-package-harness.md and tests/test_policyengine_chronicle_imports.py merged without conflict. At the merge commit the tree imports and CI's lint command passes. The six core test files under Tests and tests/test_supabase_client.py pass there too (86 passed; 1 skipped, which needs live credentials).

chronicle#354 landed on 2026-11-15 and added markdown-it-py, which main's lock had held only through supabase, to both dev lists. 32f899dc merges main at 2f2f672b, and git reported no conflict. Git's merged uv.lock named markdown-it-py but held no package entry for it, so the merge commit takes main's lock and reruns uv lock, which keeps markdown-it-py and mdurl. tests/test_chronicle_boundaries.py keeps #354's new tests and this branch's edits to test_legacy_target_api_is_retired.

Changes

  • Remove chronicle load-supabase-mirror, load_supabase_mirror, SupabaseMirrorLoadReport, SupabaseTableLoad and chronicle.harness.load_supabase_mirror_files. The command now exits 2 with invalid choice.
  • Remove query_sources from chronicle.sources and policyengine_chronicle.sources, and delete chronicle/sources/client.py, which only re-exported it. Remove LEDGER_SCHEMA / POLICYENGINE_LEDGER_SCHEMA.
  • Delete db/supabase_client.py (SupabaseConfig, get_supabase_client), its re-export module chronicle/client.py and tests/test_supabase_client.py, and drop "client" from chronicle.__all__. Importing chronicle.sources no longer loads supabase.
  • Drop supabase from pyproject.toml; uv.lock loses 29 packages, supabase and the 28 that nothing else requires, and differs from main's lock only by what this PR's pyproject.toml changes require.
  • Require pypdf[crypto] in project.dependencies. pypdf's crypto extra adds cryptography, which pypdf uses to decrypt AES, and until now only supabase brought cryptography into the environment. The SFPD pension amount bands package needs it: db/data/sfpd/pension_amount_bands_2025/nl_statistiek_2025.pdf carries AES-256 encryption with an empty user password, and the package's generator and tests/test_chronicle_sfpd_pension_amount_bands.py open that PDF with pypdf. The lock keeps cryptography 46.0.3 and what it requires, cffi 2.0.0 and pycparser 2.23, at main's versions.
  • Keep chronicle export-db-tables and its output. Exported by this head and by main, one ledger.db (SOI Table 1.1 2023: 13 tables, 2,319 rows) gives byte-identical JSONL files, and the two manifests agree on every table's row count, size and SHA-256.
  • Add docs/supabase-mirror-retirement.md, which records what the PR retired, the schema history, the reasons, what stays, and what a hosted mirror would need to come back. Rewrite the storage architecture so ledger.db serves as the relational artifact. The rewritten doc lists what the database's tables hold, and sends readers to build-suite's reports/ for validation results and to the --build-artifacts-out JSONL for derived objects' R2 locations. Remove the mirror instructions, the uncommitted migration path and the Supabase client from README, the harness doc and docs/architecture.md. Drop the hosted backend from the db and chronicle.database docstrings, and describe the db layer by what it holds: source artifacts and their parsed contents. README now names manifest.yaml and each build's ledger.db as the stores of queryable provenance, and docs/us-legacy-etl-cleanup.md stops describing a hosted mirror as current. The changelog fragment lists every removed name and dates its findings to the 2026-10-12 checks.
  • Add tests/test_supabase_mirror_retired.py (95 tests), test_export_covers_every_table_the_db_build_writes, and a test that every name in chronicle.__all__ imports. Trim the loader, query_sources and LEDGER_SCHEMA tests, and point test_legacy_target_api_is_retired at the deleted modules.

Invariants

  • No shipped module imports a Supabase client. test_no_shipped_module_imports_a_supabase_client parses with ast every module in scripts and in the wheel packages that pyproject.toml lists. It reads import statements, resolving relative ones against the file's package. It also reads calls to importlib.import_module and __import__, and follows the names that import statements and single-name assignments bind to them. The aliases it follows include from importlib import import_module as load, import importlib as il, load = importlib.import_module, aliases of aliases and getattr(importlib, "import_module"). It counts a call through any other name as no import, so it passes print("supabase") and host.endswith("supabase.co"). It misses an alias bound another way, such as by tuple unpacking or a default argument, and it treats a name bound to import_module anywhere in a module as bound everywhere in it. The test looks for supabase, db.supabase_client, chronicle.client and Supabase's client packages. These cover the five that supabase 2.27.0 requires in main's lock (postgrest, realtime, storage3, supabase_auth, supabase_functions), plus gotrue and supafunc, PyPI's earlier names for the auth and functions clients. It compares the importers it finds with an empty allowlist for equality, so an allowlist entry that names no importer fails too.
  • pyproject.toml requires none of those distributions and nothing else whose name starts with supabase. test_supabase_is_not_a_dependency normalises each requirement's name and reads the dependencies, the extras, the dependency groups and uv's older [tool.uv] dev-dependencies.
  • db.supabase_client and chronicle.client do not exist (test_legacy_target_api_is_retired).
  • Every name in chronicle.__all__ imports as chronicle.<name> (test_every_name_in_chronicle_all_imports_as_a_submodule).
  • export-db-tables covers every table that build_chronicle_db writes (test_export_covers_every_table_the_db_build_writes).
  • No live code or doc names a retired surface, such as the client's POLICYENGINE_SUPABASE_URL, get_supabase_client or SupabaseConfig (test_no_code_or_doc_advertises_the_retired_mirror). The scan covers README, AGENTS.md, pyproject, docs/, .github/, ots/ and every shipped package. It skips the retirement record, changelog.d/, tests/ and work logs (PROGRESS.md, LANE_*), which keep their history.
  • A module that posts to the Data API with plain httpx imports nothing of Supabase's, so no import scan sees it. If it names POLICYENGINE_SUPABASE_URL, the doc scan fails; a project URL from any other variable or from configuration passes every guard.
  • In a scratch copy of ec4a9fea, 35 mutants each brought back one retired surface, broke one invariant or switched off one piece of the import scan, and the guarding tests failed on every one. They include a new shipped module that imports supabase, three relative imports of the deleted clients, a doc that names load-supabase-mirror, and an allowlist entry for the deleted chronicle/client.py. Six switch off one piece of the import scan each, such as following getattr, and each fails the detection cases that piece decides and no others. The unmutated copy passes the same tests before every set of runs, and after each set its files match their starting state.
  • Seven more runs write an ordinary call that names Supabase into a shipped module: print("supabase"), importlib.metadata.version("supabase") (also through import importlib.metadata as md), logger.warning("supabase"), host.endswith("supabase.co"), load = print and a module's own load function. The test file passes each, and the 32f899dc version fails each at the importer test.
  • Ten of the 35 pass an earlier version of the test file that catches them. Five pass the eb9df0a4 version: "client" back in chronicle.__all__, and four calls in shipped modules that pass a string literal to import_module or __import__. Five pass the 43ad9584 version: a postgrest import, an aliased import_module("supabase"), a postgrest requirement, supabase under [tool.uv] dev-dependencies, and a doc that names the client's URL variable, function and config class.
  • Eight of the 95 tests in tests/test_supabase_mirror_retired.py fail on unmodified main 2f2f672b. The other 87 exercise the detection helpers and pass there.

Overlaps

This PR leaves the hosted project alone, including the nine arch tables the 2026-10-12 check found, and it leaves the repository's Supabase variable and secret in place. Removing them changes hosted state, and d1447 holds that decision.

Agent role and judges

  • No agent role fits cleanly. The PR deletes code in chronicle/sources/** (ledger-source-ingestor) and policyengine_chronicle/** (ledger-contract-maintainer). It also deletes db/supabase_client.py, chronicle/client.py and a dependency, which sit outside both roles' paths. It adds no facts, schemas or source packages.
  • An independent review returned the three judge verdicts below at 9017d36a, the head before either merge. No judge has run on any later commit.
    • ledger-contract: PASS. No fact schema, fact key, consumer contract or ledger.db table change; every provenance table still exports. policyengine_chronicle.sources loses only query_sources, which has no caller.
    • ledger-boundary: PASS. Only deletions, docstrings and tests; no reconciliation, aging, imputation, activation or solver construction.
    • ledger-source-fidelity: PASS. No facts or source values added or changed.

Review

  • An independent review of 28afc9c4 requested changes with no P1s, and 975d27b7 addresses its findings.
  • A delta review of 975d27b7 asked for two more fixes, relative imports in the guard and the branch-sweep count. 98cca223 makes them, and the reviewer approved that head and then 9017d36a, which takes the reviewer's wording for one doc sentence.
  • A consumer-refute pass on 2026-10-12 found no consumer.
  • An independent review read the tree at 43ad9584 without running anything, so it did not recompute the merge, diff the lock against main or check the overlaps. It requested changes, with one P1: the retirement record said nothing Chronicle reads or writes sits on a host, though Chronicle uses two R2 buckets. 58dea217 through fef81657 answer its findings with two exceptions. /rest/v1 stays out of the doc scan because DWP Stat-Xplore's endpoint URL contains it, and main's certifi fragment keeps the wording it landed with.
  • An independent review read 32f899dc with a shell. It ran the scan's helpers, created the ledger.db schema in memory, and checked both merges file by file and the lock against main's. It raised no P0 or P1 and two P2s. The import scan counted any call that passes a Supabase name first, such as print("supabase"), as an import. docs/storage-architecture.md promised a validation status that no ledger.db table holds. ed397f4c and ec4a9fea answer the first, and c1307be5 the second; the three change only the guard's test file and that doc. An independent check of ec4a9fea then reran the scan's helpers, the six core test files, CI's lint and the 35 mutants, and found nothing above P3.

Tests

At ec4a9fea, in an environment from uv sync --locked --all-extras --python 3.14 (Python 3.14.7) where import supabase fails:

  • CI's lint, uv run ruff check chronicle policyengine_chronicle db scripts tests, passes, and ruff format --check passes on the 13 Python files this PR adds or changes.
  • Importing chronicle.sources and policyengine_chronicle.sources loads no supabase module, and markdown_it imports. chronicle --help and chronicle export-db-tables --help exit 0, and chronicle load-supabase-mirror exits 2.
  • The six core test files pass, each in its own pytest process: tests/test_supabase_mirror_retired.py (95 tests), tests/test_chronicle_mirror.py (4), tests/test_chronicle_namespace.py (17), tests/test_chronicle_boundaries.py (59, with Check the measure ids the US legacy ETL cleanup doc names #354's tests), tests/test_policyengine_chronicle_imports.py (7) and tests/test_chronicle_sfpd_pension_amount_bands.py (20).

At eb9df0a4, the parent of 43ad9584, in the same kind of environment, 524 tests pass in 23 files: the six core files and 17 more. The 17 cover every other test file that imports chronicle.harness, chronicle.mirror, chronicle.cli, chronicle.database, db or policyengine_chronicle.sources, apart from the bundle test.

CI runs the other 52 test files that import chronicle.sources. In that package this PR deletes client.py and drops query_sources from __init__.py, and none of those 52 files names either one or reads __all__. Only CI runs the two bundle tests, tests/test_chronicle_bundle.py and tests/test_chronicle_uk_national_2025.py.

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits October 12, 2026 16:36
The `ledger` schema that `chronicle load-supabase-mirror` and `query_sources`
addressed does not exist in the configured Supabase project, so every call
failed with PGRST106, and nothing read a hosted copy. `query_sources` also
expected a `sources` table that Chronicle's DB build never creates.

Remove the loader (command, harness wrapper, report types), `query_sources`
and its re-exports, and the POLICYENGINE_LEDGER_SCHEMA setting. Keep
`export-db-tables`, whose output is unchanged. Document the retirement and
what a hosted mirror would need to come back, and add tests that keep the
retired surface from returning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes for the Supabase mirror retirement:
- Tell the true history: query_sources read microplex.sources in December
  2025 and an Arch-era loader filled nine arch tables on 2026-05-05; renames
  then left both defaulting to a ledger schema nobody created.
- Detect Supabase imports by parsing, across every wheel package plus
  scripts, so `from supabase import ...` and packages/ are covered.
- Let the namespace test tolerate the client module's planned deletion.
- Scan live docs only, leaving work logs their history.
- Describe publishing and fetching ledger.db as options, not automatic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Relative imports (`from .supabase_client import ...`, `from ..client import
...`, `from . import supabase_client`) slipped past the guard. Resolve them
against each file's package before matching. Also correct the branch-sweep
count in the retirement record and reflow the changelog fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply the reviewer's wording: several matches never touched the hosted
project, so describe them as unrelated uses of the same search terms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 11 commits November 14, 2026 09:51
Main is 4ce631f. Its chronicle#353 retired the legacy target tables and the
target half of the Supabase client; this branch retires the hosted mirror
loader and the source half. Git reported four conflicts, each where the two
sides deleted different halves of the same file. Each resolution keeps both
deletions:

- db/supabase_client.py: drop LEDGER_SCHEMA and query_sources (this branch)
  and TARGETS_SCHEMA, query_strata, query_targets and insert_targets_batch
  (main). SupabaseConfig, get_supabase_client and _table stay, because
  chronicle/client.py still imports the module. The docstring carries both
  retirement notes; its title returns to "Supabase client for Chronicle",
  since no target helper remains. The typing import leaves with its last
  users.
- tests/test_supabase_client.py: keep the config tests; drop both sides'
  query tests, the empty TestSupabaseQueries class and the MagicMock import.
- tests/test_chronicle_namespace.py: keep main's coverage-helper test, the
  client re-export test and the normalization test; drop both schema
  constants and their test.
- docs/architecture.md: take this branch's "Relational Artifact" paragraph
  over main's hosted-schema table.

README.md, chronicle/harness.py, docs/agent-source-package-harness.md and
tests/test_policyengine_chronicle_imports.py merged without conflict.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
chronicle#353 landed first and retired the legacy target-input helpers,
the last callers of the Supabase client besides the mirror loader and
query_sources that this branch retires. The two pull requests agreed that
whichever landed second would delete the client, so this commit does.

- Delete db/supabase_client.py, chronicle/client.py and
  tests/test_supabase_client.py; drop "client" from chronicle.__all__.
- Drop supabase from pyproject.toml and regenerate uv.lock (uv 0.11.7,
  "uv lock", no upgrade). The lock loses 31 packages: supabase and the 30
  that only it required.
- Require pypdf[crypto]. cryptography reached the environment only through
  supabase (supabase-auth -> pyjwt -> cryptography), and pypdf needs it to
  read db/data/sfpd/pension_amount_bands_2025/nl_statistiek_2025.pdf, which
  is AES-256 encrypted with an empty user password. Without it
  tests/test_chronicle_sfpd_pension_amount_bands.py and that package's
  generator fail. cryptography, cffi and pycparser keep their locked
  versions.
- Tests: the importer allowlist is empty and the guard compares for
  equality, so a stale entry fails too; a new test rejects a supabase
  requirement in pyproject.toml; the boundary test asserts both client
  modules are gone; the namespace test drops the client re-export.
- Documents: the retirement record lists the client, chronicle.client and
  the dependency as retired and credits chronicle#351 with the retirement
  (the evidence checks keep their 2026-10-12 date); the storage and
  architecture docs, README, a docstring in chronicle/database.py and the
  changelog fragment follow.

uv 0.11.7 writes lock revision 3 where main's lock says 5 (uv 0.13.4 wrote
that line in 30ba317). The next commit restores the line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main's uv.lock says "revision = 5": uv 0.13.4, the version CI installs,
wrote that line in 30ba317, and that commit changed nothing else in the
lock besides the certifi entry it upgraded. The previous commit regenerated
the lock with uv 0.11.7, which writes "revision = 3"; uv 0.12.13 writes the
same bytes. This Mac has no newer uv.

This commit restores the one line by hand, so the lock differs from main's
only where the dependency change requires. "uv lock --check" passes on the
result under uv 0.11.7 and 0.12.13 and leaves the file untouched.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- tests/test_chronicle_namespace.py: every name in chronicle.__all__ must
  import as chronicle.<name>. Putting "client" back with no module behind
  it passed every guard file before this test; it now fails, and
  "from chronicle import *" would raise AttributeError on it.
- tests/test_supabase_mirror_retired.py: the importer guard also reads
  calls that pass a string literal to import_module or __import__, so
  importlib.import_module("supabase") or __import__("supabase") in a
  shipped module fails it. A relative name resolves against
  import_module's literal package argument, or, for __import__'s level,
  against the module's own package; __import__'s literal fromlist entries
  count like "from module import item". No shipped module makes such a
  call today, and the detection test gains twelve cases.
- db/__init__.py: the layer holds source artifacts and their parsed
  tables, columns and rows (db/schema.py); chronicle#353 retired the
  target inputs its first line still named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The record said that with the mirror retired "nothing Chronicle writes or
reads is hosted, so there is nothing to rename". Chronicle still reads and
writes the R2 buckets ledger-raw and ledger-derived, which issue #143 lists
for renaming beside the Supabase schema, and ledger.db keeps its file name
and its ledger_builds table. The sentence now claims only what the retirement
makes true: Chronicle reads and writes no Supabase schema.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The artifact-registration paragraph said production raw files live in R2
"with manifest.yaml and the hosted database carrying the queryable
provenance". No hosted database exists after the mirror's retirement, and
the same README says so. The manifest and the source_artifacts table of each
build's ledger.db carry that provenance (source URL, checksum, size, vintage
and R2 location), as the README's later paragraph on R2 already states.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Its Consumers section said in the present tense that the legacy targets
table "is not part of ... the hosted mirror (chronicle/mirror.py exports only
the source-package tables)". chronicle/mirror.py now only writes the table
export, so the sentence names that. The record's past-tense statement that
the hosted mirror never carried the table stays as history.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A review of 43ad958 found four ways a Supabase client could come back past
tests/test_supabase_mirror_retired.py:

- through the client packages supabase is assembled from. The importer scan
  and the dependency test now share one set of distributions: the five that
  main's uv.lock listed under supabase 2.27.0 (postgrest, realtime, storage3,
  supabase-auth, supabase-functions) and gotrue and supafunc, the earlier
  names of the last two. The dependency test compares normalised
  distribution names and keeps the supabase prefix as the wider net.
- through an aliased dynamic import (from importlib import import_module as
  load; load("supabase")). The scan no longer trusts the called function's
  name: any call that passes a Supabase module's name as its first string
  argument counts. It flags nothing in the tree today (0 of 2,936 such
  calls in 100 shipped modules).
- through [tool.uv] dev-dependencies, which the dependency test did not read.
- in a document or module that names POLICYENGINE_SUPABASE_URL,
  get_supabase_client or SupabaseConfig. /rest/v1 stays out of the retired
  strings: DWP Stat-Xplore's endpoint carries it.

New parametrised cases pin each: 34 tests become 79. A REST call to a
project URL read from another variable imports nothing of Supabase's and
stays beyond an import scan.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The fragment stated what the hosted Supabase project lacked, that nothing
read the loaded copy, and that no outside repository imports the removed
names, all in the present tense and with no date. Those findings come from
the read-only checks and searches of 2026-10-12, which the retirement record
and docs/storage-architecture.md already date. The fragment now says so, and
nothing later is claimed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Line 106 ran to 95 columns in a file whose prose wraps at 80. No word
changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The widened guard reads every call that passes a string literal first as
__import__(name, globals, locals, fromlist, level). Thirteen Measure(...)
calls in packages/ed_fsa/build_packages.py pass scale factors of 1,000,000
and 1,000,000,000 fifth, so the guard built strings of up to a billion dots
before resolve_name refused them, and the importer test took about 97 s.
resolve_name refuses a level above the package's depth, so check that first;
no input changes its result. Two cases pin the check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
MaxGhenis and others added 4 commits November 14, 2026 20:02
Main is 2f2f672, the landing of chronicle#354, which added markdown-it-py
to both dev lists and four lines to uv.lock. Git merged every file without
a conflict. Both sides' edits to tests/test_chronicle_boundaries.py and
docs/us-legacy-etl-cleanup.md survive.

Git's merged uv.lock named markdown-it-py in the project's entries but held
no package entry for it, because this branch's earlier lock run dropped it
with supabase. So this commit takes main's uv.lock and reruns "uv lock"
(uv 0.11.7, no upgrade). Against main, the lock loses 29 packages:
supabase and the 28 that only it required. It keeps markdown-it-py and
mdurl for #354's dev lists, and adds the five pypdf[crypto] lines.

uv 0.11.7 writes "revision = 3" on line 2. This commit restores main's
"revision = 5" by hand, as eb9df0a did, and "uv lock --check" passes on
the result without rewriting it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The guard read every call that passes a string literal first as an import,
so print("supabase"), importlib.metadata.version("supabase") or
host.endswith("supabase.co") in a shipped module failed
test_no_shipped_module_imports_a_supabase_client (round 2's first P2).
The scan now follows the names a module binds to importlib.import_module or
__import__: the bare names, attribute access on importlib or builtins,
from-import and plain-import aliases, assignment and walrus aliases, aliases
of aliases, and getattr(importlib, "import_module"). It reads each call
with its own function's signature, no longer both ways.

print("supabase") now counts as no import. Two cases called load and imp
with nothing bound to them; they now bind them first, as a module calling
them must, and the level and relative-name negatives do the same. Seven
cases pin the alias forms and six more pin ordinary calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"The artifact exposes" made the list a claim about today's ledger.db, and
its last item named validation status, which none of the 13 tables
_create_schema writes holds (round 2's second P2). The item now lists what
ledger_builds carries. Validation results live in build-suite's reports/
directory beside the database, with the overall valid flag in
reports/build_summary.json, and publish-derived uploads them with the rest
of the build.

The doc also said source_artifacts and build_artifacts carry R2 columns as
if both filled. No code inserts into build_artifacts: publish-derived
--build-artifacts-out writes those rows to a JSONL file. The paragraph now
says so, and the summary names only raw objects' R2 locations. The other
list items match the schema and its inserts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ast.walk visits a module's top-level statements before the bodies of try
blocks, so in a module that imports import_module under a try and then
aliases it at the top level, one pass reaches `fetch = load` before `load`
has a binding. The scan repeats until no name gains one; this case fails if
it stops after one pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant