Repository navigation
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
Conversation
…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>
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.
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-ffmerge.TR-114: Resource Explorer's own later reads are counted apart (20aa03f)
OdsRead.filesystem_own_reads, so reads that Resource Explorer itself made after the walk are not reported as genuine hot reads.TR-120: Create-in-Egeria words (b87b32c)
TR-115, TR-129, TR-130, TR-112d: schema stores in external mode, plus OpenShift writable paths (73b5bfc)
RE_SCHEMA_MODE=external. The registry and all four stores (metrics, feedback, vectorstore, artifact tree) get their DDL from oneresource-explorer schema applystep, 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.resource-explorer schema apply".ensure_extensionis now caught narrowly and named in the refusal, instead of swallowed.docs/dr-egeriatree is group-0 writable, for OpenShift's arbitrary UID.TR-127: data-class seed and the
name_onlyverdict (02d2416)matchPropertyNames, and only Email Address ships a value specification.dataPatternswith no regex metacharacters are treated as name hints.name_only: for a match on column name and type alone. It is never established, counted, listed on Curate or sent to Egeria.TR-128: card counts and ranking by verdict (ec36e47)
no_match, so they are never cut.TR-124: folder descriptions skip license headers (3a7418c)
TR-125: spreadsheet values are sampled (913a07a)
TR-126: Egeria-profiled CSVs are read for matching only (b9fa7fa)
Checks
🤖 Generated with Claude Code