Skip to content

File-system survey bundle: TR-69, TR-75, C1–C3 (item C) - #1114

Merged
dwolfson merged 17 commits into
mainfrom
claude/bundle-item-c-2026-11-19
Nov 19, 2026
Merged

dwolfson merged 17 commits into
mainfrom
claude/bundle-item-c-2026-11-19

Conversation

@dwolfson

Copy link
Copy Markdown
Owner

File-system survey bundle: TR-69, TR-75 and item C (C1–C3)

This merges five branches. Each one was read back by the Architect, then gated by name against main 7d3d1eb, alone and all merged together (gate b453). Nothing in it writes to Egeria until someone presses a button, and the data-class send is switched off (see C3).

Branch Tip What
claude/tr69-narrative-nul e6b2a17 TR-69. A NUL byte no longer aborts the narrative read. Passages are stored under a staging name and swapped in. A failed store keeps the previous index and answers NotStored (409).
claude/tr75-e164-overmatch 4402619 TR-75. The e164_phone column pattern no longer matches dates, IPs, decimals, IDs or epochs. A fixture audit of 136 lost matches found 0 real phone numbers.
claude/c2-fs-card-truth c83316b C2. The file-system survey card tells the truth and updates itself without a reload. Covers TR-70 and D4–D14.
claude/c1-fs-questions bde3143 C1. File-system questions answer from the runs that answer them: file profiles, narratives, data-class match, reach and price.
claude/c3-fs-publish-curate 6e40c65 C3. Publish says what it does and re-publishes without duplicates. Curate reviews the proposals. Built on C2.

C2 notes

  • D9 is partial. It covers RE's own walk only. The profile and narrative caveat needs a library ODS read, a follow-up registered as TR-85. Commit 2c72113's message still names the withdrawn filesystem_re_reads read; c83316b removes it.
  • D14 records re_only, once per walk, and only where the state is already re_only. A walk must not demote a verified row.
  • D12 makes the file-system card and the server's byte formatters decimal. fmtBytes stays 1024-based for its other callers. The hash limit reads "10.5 MB", which is 10 MiB.
  • ForkState.as_dict now carries kept. The change is additive.
  • Edited assertions, each following from the change itself:
    • Python, D14: one later-probe timestamp moved to 2099, so it stays newer than the walk's row.
    • Python, D14: one exact stale sentence is now asserted as "not the stale date".
    • Harness, files5: the new CSV waiting line, as briefed.
    • Harness, D12: 57.2 → 60.0 MB, and 10 → 10.5 MB. These are the unit change.
  • TR-71: the collapsed card stays at 15 lines. It is 16 only when the D13 price line shows.

C1 notes

  • The analysis catalogue gains action: read, documented in its header. The four read-only analyses (file_profiles, narrative_docs, file_data_class_match, survey_price) answer their questions but show no Run-disabled card on the Survey & analyses panes. build_analyses_index skips read, the same way it already skips publish.
  • Shared catalogue rows are changed through PER_TYPE_ANSWERING_OVERRIDES. The regenerated YAML touches only file-system hunks.
  • Never-run steps still say "Not yet run". An egeria-native run row credits filesystem_inventory only when the engine action succeeded and its report was read back, and Egeria leads the file system.
  • bde3143 is test-only: C1's FakeStore now matches TR-69's staging and swap store calls. Gate b452 caught this clash between the branches.

C3 notes

  • Departures from the brief:
    • Verdicts live in resource_scope_events, under two new OTHER_CHOICE_KINDS, with no DDL. catalogue_scope_events can't key a file path plus a column.
    • The data-class Egeria write is approved in shape: one DataClassAnnotation per confirmed match, under SurveyReport::FileSystem::{slug}::class_match::{run}. It stays off behind RE_FS_DATA_CLASS_PUBLISH, with no UI button. Follow-up TR-86 adds the press.
    • RequestForAction stays unwritable until a design read (TR-87).
  • Edited tests:
    • "second publish is a 409" is rewritten for the resumable publish.
    • Five test files gain a one-line report-lookup stub. The new stateful fake is in tests/fs_egeria_fake.py.
    • The Curate snapshot is regenerated; only the button label changed.
  • TR-71: the Survey card stays at 16 lines. The Curate band stays at 1 line.

Gates

Each branch's gate counts failures by name against main 7d3d1eb:

  • b448 TR-75: PASS by name. Its one failure was a worker crash in test_understanding_chart_labels_browser, which hangs the same way on main.
  • b449 C2: PASS.
  • b450r TR-69: PASS.
  • b451 C1: PASS.
  • b452, four merged: failed on the C1 × TR-69 test-fake clash, since fixed in bde3143.
  • b453, all five merged: PASS. Main suite 15512 passed, 0 failed; harness 2112/2112; trellis-analytics 294/0; no new failures in other packages. The gated tree is 46c959a8, the same tree as this branch.

The Architect's read-backs are in ~/.re-gate/READBACK-{TR69,TR75,C1,C2,C3}-*-2026-11-19.md.

After deploy

These are Dan's live checks on 8813; the read-back files list each one.

  • Re-run "Read narrative files" on egeria_v6, to restore the index TR-69 dropped.
  • Re-profile, to cover TR-75's real-shape check.
  • C2's survey card checks.
  • C1's Discovery and Analysis answers.
  • C3's "Publish chosen measures" pressed twice, and the "Attach root folder" label.

🤖 Generated with Claude Code

… a failed store keeps the previous index

The Files walk (2026-11-19) found one narrative file with a NUL byte. It aborted the whole 'Read narrative files'
run of 500 files with a bare 500, and the step had already dropped the old index before the insert failed.

- A file whose bytes hold a NUL is a new outcome, `binary`: not decoded, not chunked, 0 passages. run_words
  says "binary content (NUL bytes) · not read". The outcomes dict carries binary: 0.
- The collection is never dropped before the new one is in. The passages go into `<collection>__new` (ids
  minted under the live name), then swap_collections([(live, live__old), (live__new, live)]) in one
  transaction, then `__old` is dropped. On any failure the staging table is dropped, the old index is left
  untouched, and NotStored is raised.
- NotStored maps to 409 in the route: "the passages could not be stored (<ExceptionType>) · the previous
  index is kept". Only the exception's type name reaches the page. No failed step_run is recorded, which
  matches the step's other refusals.

Tests: FakeStore now refuses NUL text like Postgres and swaps all-or-nothing. New: the binary file case, a
failed insert keeps the previous index (and releases the claim), and the route's 409 detail. Two existing
assertions changed: the exact outcomes dict gains "binary": 0, and the replaced-whole test now expects the
dropped table to be "fs_tree_narratives__old", because the live name is swapped, not dropped.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…IPs or plain numbers

The Files walk (2026-11-19) proposed e164_phone for date, NAICS and ip_address columns, which inflated the
privacy-relevant count. The old pattern's + was optional, so any 8-22 character run of digits and separators
fullmatched: 2024-01-15, 10.0.0.1, 541511.0, 20240115.

The pattern is now two alternatives, taken from the brief's prototype (the preferred form) unchanged:
international, a required + and a non-zero digit then 7-14 more digits with optional separators; or national,
10-15 digits with at least one separator or bracket, never an ISO date, a dotted quad or a plain decimal. The
name stays e164_phone. The description says the new shape in one line. The matching machinery is unchanged.

The library is shared by the DB surveys and the file class match, so DB results change too, as intended. No
existing assertion was edited. The fixture audit over every string literal in tests/ found only dates, IPs,
decimals, epochs, ids and year ranges losing the match; no real phone did.

Tests: new test_column_matching_e164.py, the brief's must and must-not lists plus three detect_patterns
cases (ISO dates, IPv4s, +44 numbers).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…hat answer them (C1)

Walk D2: Q-0101, Q-0105, Q-0080, Q-0103, Q-0054 and Q-0109 said "no reader yet" or
"not run" minutes after their steps ran.

- Readers and catalogue entries for file_profiles, narrative_docs and
  file_data_class_match (each answers with the step's own run words, and a narrative
  or class-match run on an older walk or older profiles says so), a read-only
  resource_reachability reader over the stored probe row, and survey_price over the
  steps' own price lines (priced and not-priced steps named).
- FILESYSTEM_ANALYSIS_STEP_MAP maps the three step keys; a completed Egeria Folder
  Survey whose report was read back credits filesystem_inventory (only where Egeria
  leads); a submitted, failed or report-less native run credits nothing.
- Question catalogue: the filesystem copies only, via the CSV and per-type overrides.
  A step that never ran still says "Not yet run".

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…th and updates itself (TR-70, D4-D14)

TR-70: the card shows an Egeria-led Folder Survey in flight ("Surveying… (Egeria,
since HH:MM)", Survey off), and the pane is read again when the followed native row
settles, so no manual reload; Egeria's CSV reports still to come are one line with a
time, naming the waiting files (three at most) once some have come back, and the
read-back answer is no longer dropped. Every press on the card writes one Activity
row (what, by whom, outcome); an Egeria-led survey writes a second when it settles.
The stage header's surveyed date and published word follow the newest read-back
Egeria survey (derived on read: no new writer).

D5 a report with no stated annotation count is "not counted", never 0 (RE's stored
count where it has one); D7 class match counts profiled files; D9 fs_activity
caveats access at or after Resource Explorer's earliest own read (new ODS read
filesystem_re_reads); D10 "Check again" says when it kept a verified survey;
D11 a disabled Survey says why on one line; D12 decimal, labelled sizes on the
card; D13 a price line for Measure beside; D14 a completed RE-led walk refreshes
the reach line.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…tem list when a survey settles (C2 item 5)

The header's "surveyed" date and "published" word are drawn from state.filesystems,
which is read once. When the followed Folder Survey settles (or an RE-led Survey
press ends) the list is read again and the header and sidebar are redrawn in place
before the pane is read again, so the new survey shows with no manual reload.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…wns them), no silent-success sites

fs_activity cannot name profile or narrative runs: its reads are the library's
ODS_READS, so the new read is withdrawn and the caveat covers this walk's own hashing
only (follow-up: a library read). The two new best-effort sites say what happened.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…the silent-success ratchet passes

test_no_silent_success flagged the two best-effort drops in _replace (broad, log-only, in a function that
returns a value). Each now records what it left instead of only logging it:
- the replaced index that could not be dropped after a good swap is named on the run row as `leftover`
  ('' when clean). It is not shown on screen, and the next run drops it first;
- a staging collection that could not be dropped after a failed store sets NotStored.staging_left.
The 409 sentence is unchanged. The replaced-whole test asserts leftover == ''.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…he Egeria read-back note; update stale tests

A reader that returned a status dict for a step that never ran counted as data to
question_has_data (Q-0095 showed data after only a reach probe). Readers now return {}
when the step has no run row, and "not established" only when a run row has nothing
readable behind it. The Egeria-led inventory keeps its "Read back from Egeria's own
survey report" note now that a completed native survey credits a run. Four tests that
pinned the pre-C1 state (Q-0101/Q-0105 gaps, Q-0109 direct, one built-in analysis) now
pin the new one.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…-publishes without duplicates, and Curate reviews proposals

Publish (C3a):
- one name per action: Curate's root-folder button is "Attach root folder"
  ("Root folder attached · confirm" once attached); "Publish chosen measures"
  under the measures table and the Survey card's Publish both call
  re-api.publishChosenMeasures (one function, no logic of their own);
- the measures table's standing words are per kind (a file system has no commit);
- the walk publish is resumable: the walk's SurveyReport is read by its
  qualifiedName and reused, only the annotations it does not hold are created,
  and a press with nothing new answers 200 "already published · nothing new to
  send" (was a 409) and creates nothing; the Survey card's Publish returns while
  a chosen measure is not on the report yet, in the same published line;
- ResourceProfileAnnotation is written from a declaration (fs_activity,
  fs_permissions, fs_layout_signals); RequestForActionAnnotation stays unwritten.

Curate (C3b):
- a proposals band replaces the static sentence: folder descriptions and
  data-class matches, Confirm / Reject as signed verdicts in
  resource_scope_events (two new kinds, no new table); a re-run keeps verdicts
  whose key persists and lists the rest as "no longer proposed"; the collapsed
  band is one line, lists open 20 at a time;
- a confirmed data-class match can be written as one DataClassAnnotation under
  RE's own report (proposed shape, behind RE_FS_DATA_CLASS_PUBLISH, fakes only).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… parity, accurate live-read notes

The four read-only analyses (file_profiles, narrative_docs, file_data_class_match,
survey_price) are action: read in the analysis catalogue and the Survey & analyses
pane rows skip that action, so no card is a Run that is always off; their questions
still answer from the readers. A pytest asserts both STALE_WORDS constants appear
verbatim in fs-survey.js. The reach and price facts say what they read. Drops an
unused import.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…p store calls

insert takes id_collection and the fake has swap_collections, as TR-69's narrative
storage needs; the same fake still works on origin/main, where both are unused.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…cs only RE)

Three C3 tests import fs_activity / fs_permissions / fs_layout_signals
manifests. Those steps are workspace members, so a root `uv sync
--all-packages` (laz, the gate) has them, but CI's re-tests job syncs only
resource-explorer and has none: 6 ModuleNotFoundError failures on #1114.
Use the existing install_steps fixture (tests/library_step_install.py), as
the other library-step tests do, so the tests hold in either venv.

Checked in an RE-only venv (uv sync --extra dev in packages/resource-explorer,
fs_activity not installed): test_c3_fs_publish_and_curate.py 22 passed.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit de89e5b into main Nov 19, 2026
4 checks passed
@dwolfson
dwolfson deleted the claude/bundle-item-c-2026-11-19 branch November 20, 2026 19:16
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