Repository navigation
Retire the hosted Supabase mirror and query_sources - #351
Merged
Merged
Conversation
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
marked this pull request as ready for review
October 12, 2026 23:46
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decision: retire, not fix
We could fix or retire the hosted Supabase mirror (
chronicle load-supabase-mirror) andquery_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 thesupabasedependency, 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_URLvariable names.docs/supabase-mirror-retirement.mdrecords the details.query_sourcesreadmicroplex.sourcesin December 2025, and statement history shows its query shapes there. It moved toarch(2026-04-27), thenledger(2026-06-30). An Arch-era form of the loader filled ninearchtables with three builds on 2026-05-05. From the Ledger rename on, both defaulted toledger, which the project did not have. A Data API request returned406 PGRST106 Invalid schema: ledger, so every call with the default schema failed. No statement had ever named aledgerorchronicleschema (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.sqlas the names changed).query_sourcesanything Chronicle builds. It read asourcestable withjurisdictionandinstitutioncolumns. 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-eramicroplex.sources.archtables 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. Noanon,authenticatedorservice_roleread 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.axiom-corpusbranch 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_chronicleanddb.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_strataandinsert_targets_batch. This branch had retired the other half,LEDGER_SCHEMAandquery_sources. The two pull requests agreed that whichever landed second would delete the rest of the client, so this one does.8811fc5dmerges main at4ce631f5. 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.pykeeps neither schema constant and no query helper.SupabaseConfigandget_supabase_clientsurvive the merge commit, becausechronicle/client.pystill imported them there.tests/test_supabase_client.pykeeps the five config tests and drops both sides' query tests.tests/test_chronicle_namespace.pykeeps main's coverage-helper test and drops both schema-constant assertions.docs/architecture.mdtakes this branch's "Relational Artifact" paragraph over main's hosted-schema table.README.md,chronicle/harness.py,docs/agent-source-package-harness.mdandtests/test_policyengine_chronicle_imports.pymerged without conflict. At the merge commit the tree imports and CI's lint command passes. The six core test files under Tests andtests/test_supabase_client.pypass 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 throughsupabase, to both dev lists.32f899dcmerges main at2f2f672b, and git reported no conflict. Git's mergeduv.locknamedmarkdown-it-pybut held no package entry for it, so the merge commit takes main's lock and rerunsuv lock, which keepsmarkdown-it-pyandmdurl.tests/test_chronicle_boundaries.pykeeps #354's new tests and this branch's edits totest_legacy_target_api_is_retired.Changes
chronicle load-supabase-mirror,load_supabase_mirror,SupabaseMirrorLoadReport,SupabaseTableLoadandchronicle.harness.load_supabase_mirror_files. The command now exits 2 withinvalid choice.query_sourcesfromchronicle.sourcesandpolicyengine_chronicle.sources, and deletechronicle/sources/client.py, which only re-exported it. RemoveLEDGER_SCHEMA/POLICYENGINE_LEDGER_SCHEMA.db/supabase_client.py(SupabaseConfig,get_supabase_client), its re-export modulechronicle/client.pyandtests/test_supabase_client.py, and drop"client"fromchronicle.__all__. Importingchronicle.sourcesno longer loadssupabase.supabasefrompyproject.toml;uv.lockloses 29 packages,supabaseand the 28 that nothing else requires, and differs from main's lock only by what this PR'spyproject.tomlchanges require.pypdf[crypto]inproject.dependencies. pypdf'scryptoextra addscryptography, which pypdf uses to decrypt AES, and until now onlysupabasebroughtcryptographyinto the environment. The SFPD pension amount bands package needs it:db/data/sfpd/pension_amount_bands_2025/nl_statistiek_2025.pdfcarries AES-256 encryption with an empty user password, and the package's generator andtests/test_chronicle_sfpd_pension_amount_bands.pyopen that PDF with pypdf. The lock keepscryptography46.0.3 and what it requires,cffi2.0.0 andpycparser2.23, at main's versions.chronicle export-db-tablesand its output. Exported by this head and by main, oneledger.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.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 soledger.dbserves as the relational artifact. The rewritten doc lists what the database's tables hold, and sends readers to build-suite'sreports/for validation results and to the--build-artifacts-outJSONL for derived objects' R2 locations. Remove the mirror instructions, the uncommitted migration path and the Supabase client from README, the harness doc anddocs/architecture.md. Drop the hosted backend from thedbandchronicle.databasedocstrings, and describe thedblayer by what it holds: source artifacts and their parsed contents. README now namesmanifest.yamland each build'sledger.dbas the stores of queryable provenance, anddocs/us-legacy-etl-cleanup.mdstops describing a hosted mirror as current. The changelog fragment lists every removed name and dates its findings to the 2026-10-12 checks.tests/test_supabase_mirror_retired.py(95 tests),test_export_covers_every_table_the_db_build_writes, and a test that every name inchronicle.__all__imports. Trim the loader,query_sourcesandLEDGER_SCHEMAtests, and pointtest_legacy_target_api_is_retiredat the deleted modules.Invariants
test_no_shipped_module_imports_a_supabase_clientparses withastevery module inscriptsand in the wheel packages thatpyproject.tomllists. It reads import statements, resolving relative ones against the file's package. It also reads calls toimportlib.import_moduleand__import__, and follows the names that import statements and single-name assignments bind to them. The aliases it follows includefrom importlib import import_module as load,import importlib as il,load = importlib.import_module, aliases of aliases andgetattr(importlib, "import_module"). It counts a call through any other name as no import, so it passesprint("supabase")andhost.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 toimport_moduleanywhere in a module as bound everywhere in it. The test looks forsupabase,db.supabase_client,chronicle.clientand Supabase's client packages. These cover the five thatsupabase2.27.0 requires in main's lock (postgrest,realtime,storage3,supabase_auth,supabase_functions), plusgotrueandsupafunc, 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.tomlrequires none of those distributions and nothing else whose name starts withsupabase.test_supabase_is_not_a_dependencynormalises each requirement's name and reads the dependencies, the extras, the dependency groups and uv's older[tool.uv] dev-dependencies.db.supabase_clientandchronicle.clientdo not exist (test_legacy_target_api_is_retired).chronicle.__all__imports aschronicle.<name>(test_every_name_in_chronicle_all_imports_as_a_submodule).export-db-tablescovers every table thatbuild_chronicle_dbwrites (test_export_covers_every_table_the_db_build_writes).POLICYENGINE_SUPABASE_URL,get_supabase_clientorSupabaseConfig(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.httpximports nothing of Supabase's, so no import scan sees it. If it namesPOLICYENGINE_SUPABASE_URL, the doc scan fails; a project URL from any other variable or from configuration passes every guard.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 importssupabase, three relative imports of the deleted clients, a doc that namesload-supabase-mirror, and an allowlist entry for the deletedchronicle/client.py. Six switch off one piece of the import scan each, such as followinggetattr, 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.print("supabase"),importlib.metadata.version("supabase")(also throughimport importlib.metadata as md),logger.warning("supabase"),host.endswith("supabase.co"),load = printand a module's ownloadfunction. The test file passes each, and the32f899dcversion fails each at the importer test.eb9df0a4version:"client"back inchronicle.__all__, and four calls in shipped modules that pass a string literal toimport_moduleor__import__. Five pass the43ad9584version: apostgrestimport, an aliasedimport_module("supabase"), apostgrestrequirement,supabaseunder[tool.uv] dev-dependencies, and a doc that names the client's URL variable, function and config class.tests/test_supabase_mirror_retired.pyfail on unmodified main2f2f672b. The other 87 exercise the detection helpers and pass there.Overlaps
chronicle/mirror.py,chronicle/harness.py,db/supabase_client.py,tests/test_chronicle_mirror.pyandtests/test_chronicle_namespace.py. Theirchronicle_schema(),targets_schema(), the loader'sCHRONICLE_SCHEMAdefault and thePOLICYENGINE_LEDGER_SCHEMAcase intests/test_chronicle_env.pylose their purpose. TheirCHRONICLE_SCHEMArow indocs/storage-architecture.mdnamesPOLICYENGINE_LEDGER_SCHEMAandload-supabase-mirror, which the doc scan rejects. Both add"env"to the__all__list inchronicle/__init__.py, where this PR removes"client", and git merges that file without a conflict. TheirPROGRESS.mdadditions merge cleanly; the doc scan skips work logs.docs/storage-architecture.md. Drop itsload-supabase-mirrorblocks, and merge its$RUN_DIRedits to theexport-db-tablesandpublish-derivedexamples.docs/storage-architecture.md, where it adds a sentence and an ownership-matrix row that treat Supabase as a Chronicle store. Git merges Publish per-package consumer artifacts #232's new command next to theload-supabase-mirrorentry this PR removes fromchronicle/cli.py, and Chronicle admits only government-produced records: write the rule, drop TPC and score examples #375's README edits, without conflict.ledgerschema and mirror tables and columns (ledger_builds,ledger_source_status) among names to rename. After this PR Chronicle reads and writes no Supabase schema, so v2 surface migration plan: retire frozen ledger-named machine surfaces #143 has no Supabase schema left to rename. The item's other two names stay in Chronicle:ledger_buildsnames aledger.dbtable, andledger_source_statusa field inchronicle/pe_source_plan.py. So do the R2 bucketsledger-rawandledger-derived, which v2 surface migration plan: retire frozen ledger-named machine surfaces #143 lists separately.This PR leaves the hosted project alone, including the nine
archtables 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
chronicle/sources/**(ledger-source-ingestor) andpolicyengine_chronicle/**(ledger-contract-maintainer). It also deletesdb/supabase_client.py,chronicle/client.pyand a dependency, which sit outside both roles' paths. It adds no facts, schemas or source packages.9017d36a, the head before either merge. No judge has run on any later commit.ledger-contract: PASS. No fact schema, fact key, consumer contract orledger.dbtable change; every provenance table still exports.policyengine_chronicle.sourcesloses onlyquery_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
28afc9c4requested changes with no P1s, and975d27b7addresses its findings.975d27b7asked for two more fixes, relative imports in the guard and the branch-sweep count.98cca223makes them, and the reviewer approved that head and then9017d36a, which takes the reviewer's wording for one doc sentence.43ad9584without 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.58dea217throughfef81657answer its findings with two exceptions./rest/v1stays 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.32f899dcwith a shell. It ran the scan's helpers, created theledger.dbschema 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 asprint("supabase"), as an import.docs/storage-architecture.mdpromised a validation status that noledger.dbtable holds.ed397f4candec4a9feaanswer the first, andc1307be5the second; the three change only the guard's test file and that doc. An independent check ofec4a9feathen 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 fromuv sync --locked --all-extras --python 3.14(Python 3.14.7) whereimport supabasefails:uv run ruff check chronicle policyengine_chronicle db scripts tests, passes, andruff format --checkpasses on the 13 Python files this PR adds or changes.chronicle.sourcesandpolicyengine_chronicle.sourcesloads nosupabasemodule, andmarkdown_itimports.chronicle --helpandchronicle export-db-tables --helpexit 0, andchronicle load-supabase-mirrorexits 2.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) andtests/test_chronicle_sfpd_pension_amount_bands.py(20).At
eb9df0a4, the parent of43ad9584, 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 importschronicle.harness,chronicle.mirror,chronicle.cli,chronicle.database,dborpolicyengine_chronicle.sources, apart from the bundle test.CI runs the other 52 test files that import
chronicle.sources. In that package this PR deletesclient.pyand dropsquery_sourcesfrom__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.pyandtests/test_chronicle_uk_national_2025.py.🤖 Generated with Claude Code