Skip to content

Bundle 2026-11-22b: RE files + data-class matching (TR-124-128), schema stores (TR-115/129/130), Create-in-Egeria words (TR-120), analytics 0.5.0 (TR-114) - #1128

Merged
dwolfson merged 35 commits into
mainfrom
claude/bundle-2026-11-22b
Nov 23, 2026
Merged

dwolfson merged 35 commits into
mainfrom
claude/bundle-2026-11-22b

Conversation

@dwolfson

Copy link
Copy Markdown
Owner

Bundle 2026-11-22b: Resource Explorer files and data-class matching, schema stores for Kubernetes, analytics 0.5.0

This bundle merges eight reviewed branches onto fork main f9e1553, each as a signed --no-ff merge.

TR-114: Resource Explorer's own later reads are counted apart (20aa03f)

  • Change: fs_activity uses egeria-trellis-analytics 0.5.0's new OdsRead.filesystem_own_reads, so reads that Resource Explorer itself made after the walk are not reported as genuine hot reads.
  • Lock: moves to egeria-trellis-analytics 0.5.0, and the seam test expects the 0.5 wheel.
  • Status: already live on 8813.

TR-120: Create-in-Egeria words (b87b32c)

  • Change: an investigation bound to Egeria with no Project yet now says "Egeria Project not created yet: Publish to Egeria creates it", in the API and on the page, instead of showing an empty GUID.
  • Label: "Egeria Project (created when you publish)".
  • Unchanged: nothing is promoted automatically.

TR-115, TR-129, TR-130, TR-112d: schema stores in external mode, plus OpenShift writable paths (73b5bfc)

  • TR-115: RE_SCHEMA_MODE=external. The registry and all four stores (metrics, feedback, vectorstore, artifact tree) get their DDL from one resource-explorer schema apply step, run as the owner role. The pods never send DDL. Each store has its own fingerprint marker. If the vector extension is missing, the refusal says what the database admin must do.
  • TR-129: website collections are declared from each project's docs and homepage URLs, plus its recorded collections.
    • Tables are created before they are declared.
    • Each apply reconciles against what physically exists, so a failed apply never leaves a name declared without a table.
  • TR-130: when a new resource needs the schema Job, the refusal says so: "helm upgrade, or run resource-explorer schema apply".
  • Ratchet: a failed rollback inside ensure_extension is now caught narrowly and named in the refusal, instead of swallowed.
  • TR-112d: the image's docs/dr-egeria tree is group-0 writable, for OpenShift's arbitrary UID.

TR-127: data-class seed and the name_only verdict (02d2416)

  • Seed: keywords go to matchPropertyNames, and only Email Address ships a value specification.
  • Matcher: dataPatterns with no regex metacharacters are treated as name hints.
  • New verdict, name_only: for a match on column name and type alone. It is never established, counted, listed on Curate or sent to Egeria.
  • Behaviour change for the release notes: on databases, a class with no value rule (for example Password) is no longer auto-published as matched on its name alone.

TR-128: card counts and ranking by verdict (ec36e47)

  • Count: "N columns match a data class" counts only matched and partial matches.
  • Privacy: the privacy-relevant count sits on the proposals clause.
  • Ranking: puts real matches ahead of no_match, so they are never cut.
  • Send: for an unpublished file system it returns 409 "publish the file system to Egeria first".

TR-124: folder descriptions skip license headers (3a7418c)

  • Change: README HTML comments and SPDX/copyright header lines are stripped before a folder description is chosen. A README with only a header proposes nothing.
  • Unchanged: licence evidence is still read from the full text.

TR-125: spreadsheet values are sampled (913a07a)

  • Change: xlsx, xlsm, xls and ods files are head-sampled for data-class matching (200 rows, within the 1 MiB cap).
  • Missing library: a missing reader library is named in the result.

TR-126: Egeria-profiled CSVs are read for matching only (b9fa7fa)

  • Change: a CSV that Egeria profiled is head-sampled for matching only, and Egeria's profile stays the profile.
  • Words: each such match says "values read by Resource Explorer for matching only; Egeria profiled this file". That note is also carried to Curate's proposals and into what Send writes to Egeria.

Checks

  • Gate b495: PASS. The gated tree b0f97d7c is identical to this branch.
    • Main suite: 15990 passed, 0 failed.
    • JS harness: 0 failed.
    • trellis-analytics: 297 passed, 0 failed.
    • Every other package: 0 new failures.
  • Read-backs: an independent read-back passed every branch. Several were also checked read-only against real data:
    • TR-127: Email Address matches 12 columns on a real repository, with no false positives.
    • TR-125 and TR-126: real spreadsheets and Egeria-profiled CSVs are now sampled.
    • TR-124: 1,939 real READMEs checked, with no real first paragraph lost.
  • Bundle read-back: passed. Every merged tip matches the reviewed one, and file_class_match.py carries TR-125/126/128 together. All 35 commits are signed with Signed-off-by.

🤖 Generated with Claude Code

…SCHEMA_MODE=external

Plan only, no code change: a ddl keyword per store (default auto), one RE glue
module, one marker over all five. 8 tests fail on purpose, 3 guards pass, the
Postgres end-to-end test skips without RE_SCHEMA_TEST_PG_URL.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…(needs egeria-trellis-analytics 0.5.0)

RE's profile, narrative and data-class runs open files after the walk, so the next walk would count them as
genuine hot reads. fs_activity now asks the library's new read, filesystem_own_reads, for those runs since the
previous walk and takes the earliest of their starts and the existing hashing rule as the first own read; accesses
at or after it are counted apart in the same words. A failed read is said in the summary, never taken as none.
Also folds in TR-85: the profile and narrative caveat is this same read.

- trellis_analytics_re.ods.OdsReader.filesystem_own_reads; added to STEP_ODS_METHODS and the host's seam pin.
- narrative_docs and file_data_class_match record started_at (ran_at is the end of the run).
- Pins: RE, trellis-analytics-re and fs_activity >=0.5,<0.6; the other steps >=0.4,<0.6 so the workspace resolves.

CI cannot pass, and uv.lock cannot be updated, until egeria-trellis-analytics 0.5.0 is on PyPI (library branch
tr114-own-reads-read on the dwolfson fork). Tested locally with that branch ahead on PYTHONPATH.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…in comment

N1: the fs_activity caveat now says 'by Resource Explorer's own reads (its walk, profiles, narrative files or
data-class matches)', since it also counts reads after a profile, narrative or data-class run began.
N2: filesystem_own_reads compares surveyed_at with since as times, not text, so a run recorded with fractional
seconds, an offset or a Z is neither lost nor kept by string order; a time that cannot be read is kept.
Also: the root pyproject comment names the new pin.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… collections, extension) and red tests

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…nd check_schema (TR-115 step 1)

Default stays "auto" (today's behaviour). In external mode the store sends no DDL
and raises SchemaNotReady when the tables or added columns are missing.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…k wrapper follows RE_SCHEMA_MODE (TR-115 step 2)

Default stays auto (RE_SCHEMA_MODE unset). In external mode the collector and the
library feedback store send no DDL and raise SchemaNotReady when the schema is missing.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…E sink checks instead of creating (TR-115 step 3)

Default stays auto. In external mode create_schema() is refused and the RE sink
runs check_schema() (read-only), never DDL.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… check and typed refusals (TR-115 step 4a)

Default stays auto. In external mode connect() sends no CREATE EXTENSION/SCHEMA, the DDL
operations (create_collection, create_index, delete/rename/swap) are refused with
SchemaNotReady, auto_provision_on_insert is refused, and an insert into a collection not in
declared_collections_table fails before any write.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…r stores, with per-store markers (TR-115 step 5)

schema apply now brings the registry, metrics, feedback, vectorstore (extension, declared
collections) and artifact tree to version, and writes one marker row per store plus a combined
row. In RE_SCHEMA_MODE=external the web start calls require_ready, which names the store that
drifted. The fingerprint follows several roots and the three trellis packages. A SQLite registry
applies the registry only. D1-D4 recorded in the plan.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The own-reads read (OdsRead.filesystem_own_reads) is in 0.5.0 on PyPI, so the
lock moves from 0.4.0 to 0.5.0 to match the >=0.5,<0.6 pins already on this branch.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
test_the_library_is_the_installed_wheel_not_this_tree asserted a 0.4.x
distribution; the lock now installs 0.5.0, so it checks for 0.5.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ob words, counted statements)

Seven tests that fail on efd5510: declared names for site collections, the refusal words, the
statement counts of metrics, feedback and artifact tree, and the end-to-end proof that a project
added after the first apply gets its site collection on the next apply and an external insert works.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…s, counted statements

schema apply now declares every collection RE will write: <slug>_<type>, site_collection_name() of each
project's docs_url and homepage_url (website ingestion keys on the host, not a slug), and the names a project
has recorded. The collections are reconciled on every run, not only when a store's DDL changed: a project
added since the last run gets its tables on the next one. The refusal for an undeclared collection says a
new resource needs the schema Job (helm upgrade, or run `resource-explorer schema apply`). Each store's
apply_schema returns the statements it sent, replacing the constants in apply_all.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…thing declared without its table)

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…res them (TR-129/130 read-back W1)

Names were declared and committed before their tables were made, so a Job that died in between left names declared
without a table: every later apply skipped them and the pods failed on insert. Now the tables and indexes are made
first and only then declared, and the reconcile looks at what physically exists (table and vector index), so a name
declared by the old order is repaired on the next apply.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…OpenShift arbitrary UID)

The bootstrap heal writes <name>/egeria-outbox under docs/dr-egeria. That tree was trellis:trellis, so under
an arbitrary UID with GID 0 the heal failed with "Permission denied". Found on OpenShift Local (kind runs as trellis).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…t yet; relabel the choice

New investigations default to the "egeria" binding, which only records intent: the Egeria Project is created when
the investigation is promoted. An API create, and the page, showed an empty egeria_project_guid with no words, and the
page read "local". The words are fixed, not the binding: no auto-promote, nothing about when or how the Project is
made changes.

- registry.get_investigation (so create, get and list all carry it) adds egeria_project_words = "Egeria Project not
  created yet: Promote creates it" when the binding is egeria and the GUID is empty. Not when the Project exists, not
  for a local investigation, and not after an Egeria reset (that state keeps its own words).
- The page shows those words instead of "local" in the header and the Egeria section; nothing else is added (TR-71).
- The binding choice "Create in Egeria" is now "Egeria Project (created when you promote)".

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…label "(created when you publish)"

The page button that creates the Egeria Project is "Publish to Egeria →", not "Promote", so the words and the choice label say what the person sees pressed.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…t-success ratchet)

The rollback after a refused CREATE EXTENSION had a broad except that passed. It now catches only psycopg2.Error and
says in the SchemaNotReady message that the connection also failed to roll back.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…es, and a distinct name_only verdict

The data-class seed put column-name KEYWORDS in the DataClass's dataPatterns, but the value matcher fullmatches
specification + dataPatterns as VALUE regexes, so every seeded class failed its own value test on real values.

Seed (bootstrap_data_classes.py, data_classes.yaml):
- the keywords are sent as matchPropertyNames; no dataPatterns is sent (no keywords there, no blank list item);
- a new optional per-entry `specification` (a python regex, validated at load) is sent as the class's specification:
  email, phone, SSN, credit card and date of birth have one; Password has none (no value shape).

Matcher (column_matching.py):
- a dataPatterns entry with no regex metacharacter is a name hint, not a value regex (KnownDataClass.name_hints,
  value_regexes), so classes already seeded the old way stop disqualifying themselves; blank entries are ignored.
- Architect ruling (b), 2026-11-22: a column whose name and type fit a class with NO value rule is the new verdict
  `name_only`, never "matched". It is in NOT_ESTABLISHED_VERDICTS and not in ESTABLISHED_VERDICTS, so it counts as a
  match nowhere (file match card counts, table preview, Curate's review band, Send) and fails closed.
  The honest sentence ("on column name and type only ... no value conformance was tested") is kept.

CHANGES ON PURPOSE (note for the release notes): the database column-profile publish no longer sends a class GUID for a
name-and-type-only column. Before, Password (and any class with no value rule) went out as a matched DataClassAnnotation on
name alone; now it is published as not established, confidence 0, with no candidate class.

Not changed: the bootstrap never updates existing Egeria elements. An owner who wants an already-seeded DataClass tidy
sets matchPropertyNames to the keywords, specification to the regex, and clears dataPatterns, by hand in Egeria (the
matcher already treats those keywords as name hints). The real-data read-back (egeria_v6, against a test schema) is laz's.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…d date of birth stay name_only

Architect read-back (a6e148d, 2026-11-22): ruling (b) holds, but the seed's value regexes did not. Run in-process on the
real egeria_v6 heads (530 files), a value conformance of 0.95 or more, at weight 0.70, makes a match whatever the column is
called: Date of Birth matched 35 date-only columns, Phone matched 17 (NAICS codes, ip_address, salary, value_gbp), and by
construction SSN matches any 9-digit id and the card any 13-19 digits. Only Email's shape is specific enough to ship.

Phone, SSN, credit card and date of birth now carry no specification (their regexes are not in the seed, not commented
in), so they stay name_only. A test pins that the shipped seed has a specification only for Email Address. The better
design (a value-AND-name rule for generic shapes, and a Luhn check for cards) is TR-131 and is not built here.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… for an unpublished file system

(a) The Data Class Match card counted `established` (matched + no_match + unmatched_patterned) as "columns matching a
    data class". It now counts matched + partial_match, by verdict, read from the run's own verdict counts so runs stored
    before this change read right too. The summary also carries `matching`.
(b) file_class_match._rank put `established` first and then confidence, and a no_match carries confidence 100, so no_match
    rows pushed real matches past MAX_KEPT (6 of 12 were cut on egeria_v6). It now ranks by verdict: matched and
    partial_match, then proposals, then no_match, then anything not established; privacy-relevant rows still first.
(c) Send (publish-data-classes) to a file system not yet published to Egeria answered 502, a server fault. It is a conflict
    the person can act on: 409 "publish the file system to Egeria first".

Counting and ranking are by verdict only, with no evidence filter (Architect ruling on TR-127: name_only is its own verdict).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ss match

file_class_match.sample_values sampled only csv/tsv/tab/psv/jsonl/ndjson/parquet heads, so a spreadsheet's columns were
never compared with a data class ("values are not sampled from .xlsx files here"), though file_profiles already opens
workbooks. Now the first MAX_VALUES rows of a workbook's first sheet are sampled, under the same limits:
- the byte limit (SAMPLE_BYTES) decides whether the workbook is opened at all: a workbook is a zip and cannot be cut at a
  line, and file_profiles already calls one over its limit OVER_LIMIT, so such a file has no profiled columns to match;
- the row limit is MAX_VALUES, read by pandas (nrows), which stops after them;
- a missing library (openpyxl, xlrd, odfpy) is said in the reason, never a silent skip; an unparseable workbook says so.
json stays "read whole only". file_profiles gains the _SPREADSHEETS name for the set it already used inline.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…he matches

Architect read-back: run_words printed "N columns match a data class (P privacy-relevant)", but privacy_relevant is set on
unmatched_patterned PROPOSALS (RE's pattern library: email, IPv4, postcode), never on a match, so a run of 12 email matches
and 2 privacy-relevant proposals read "12 columns match a data class (2 privacy-relevant)". The count moves into the proposals
clause: "N columns with a pattern no class has (P privacy-relevant) - a proposal for a new class". The run summary carries
proposals_privacy_relevant (unmatched_patterned and privacy_relevant); stored runs without it fall back to privacy_relevant,
which on every stored run was the same proposals.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A file Egeria's CSV Survey Service profiled was never opened by Resource Explorer (EGERIA_NOT_OPENED), so its columns stayed
not_sampled and could never be compared with a data class. Decided by Dan ("TR-126 - ok"): its head is now read FOR MATCHING
ONLY. Egeria's profile stays the profile: nothing is written to the profile rows (a test compares them before and after).

- file_class_match: an Egeria-profiled file is sampled with the same limits as any other (sample_values); the match, its
  statement and the run's file row carry EGERIA_READ_FOR_MATCHING_WORDS, "values read by Resource Explorer for matching
  only; Egeria profiled this file". New file outcome egeria_profiled_sampled; egeria_profiled now means "could not be read
  here". A secret-looking name is still never opened, Egeria-profiled or not. The price line no longer says such files are
  not opened.
- fs-survey.js: the card says "N files profiled by Egeria · values read by Resource Explorer for matching only" on its own
  line; the old line now reads "could not be read here, so not sampled", for files that could not be.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…osing a folder description

Curate's folder-description proposals were raw README licence headers ("<!-- SPDX-License-Identifier: CC-BY-4.0 -- …"):
extract_narrative took the first non-blank line as the title and the first paragraph as the description, so an Egeria-style
README, which opens with an SPDX comment and a copyright comment, proposed the comment.

strip_header_noise removes HTML comments (multi-line, inline and unterminated ones) and SPDX/copyright header lines (any
comment leader: #, //, *, --; "Copyright 2024", "Copyright (c)", "(c) 2024", "©", "SPDX-...: ") before the title and
description are chosen. If nothing is left, both are empty and Curate lists nothing for that file (fs_review already skips
a narrative with neither): absence, not junk. A heading that merely starts with the word Copyright is kept. The licence,
owner, source and dates are still read from the FULL text; only what is proposed as a description changes.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…sal and the Send annotation

Architect read-back: read_note reached the match statement but not fs_review.class_proposals or Send, so a confirmed match on an
Egeria-profiled file would go to Egeria as a DataClassAnnotation that did not say Resource Explorer read the values.

- class_proposals: each proposal carries read_note ("" for a file RE profiled).
- publish_confirmed_data_classes: the annotation explanation ends with the note, and jsonProperties carries readNote, only when
  there is one.

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>
…ndle

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

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

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 4867b7b into main Nov 23, 2026
6 checks passed
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