Repository navigation
Bundle 2026-11-23: data-class value+name matching (TR-131/135), repo branches (TR-132 C1), shared LLM package (TR-38), and 16 RE/EA fixes - #1129
Merged
Conversation
…al URL and no Egeria block Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…form URL or view server (TR-133) /.well-known/agents.json needs no token, yet it carried the internal Egeria platform URL and view server name. The egeria block is gone (not opt-in); every URL left is built from A2A_PUBLIC_URL. The test that asserted the binding now asserts the version only; the red test from the previous commit passes. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…e; Luhn for cards; real Phone, SSN, DOB rules Architect real-data check (egeria_v6, 2026-11-22): a value conformance of 0.95 at weight 0.70 made a match whatever the column was called. Date of Birth matched 35 date columns (purchase_date, system_install_date, ...), Phone 17 (NAICS codes, ip_address, salary, value_gbp) and missed real phone columns with "x718" extensions, SSN matched any 9-digit id and the card regex any 13-19 digit number. So TR-127 shipped only Email's specification. Value AND name (column_matching.py): - A class whose value shape is GENERIC is established only when its values conform AND the column name passes its name hints. On its values alone it is held back: never the match, named among other_candidates with a held_back_reason. The outcome is at most a proposal (unmatched_patterned) or no_match. - The name test (name_hint_passes) needs a hint's distinctive tokens, beyond generic words (date, number, id, code, ...): birth_date / date_of_birth / customer_dob pass Date of Birth; purchase_date and a bare `date` do not. - How "generic" is marked: BOTH explicit and inferred. Explicit: the seed entry's `requiresNameMatch: true`, sent as the DataClass's specificationDetails (Egeria's own string map on DataValueSpecificationProperties) and read back by the catalog, so the rule is visible in Egeria and travels with the class. Inferred: any value regex that fully matches a bare digit string or a plain date (GENERIC_SHAPE_PROBES) needs the name too, so a generic class authored by hand in Egeria or seeded before TR-131 fails closed. Inference only ever adds the requirement; an explicit "false" cannot loosen it. - `specificationDetails.valueCheck`: a named check every value must pass on top of the regex. `luhn` is the card checksum. An unknown check tests nothing, is reported in unusable_specifications, and falls to name_only. Seed (data_classes.yaml, bootstrap_data_classes.py): Phone, SSN, Credit Card and Date of Birth ship their specifications again, each with requiresNameMatch; the card also has valueCheck: luhn. Password still has none, so it stays name_only (TR-127 ruling (b), unchanged). The seed refuses a non-boolean requiresNameMatch, an unknown valueCheck, and either one without a specification. - Phone: North American or + international numbers, with an optional extension (x718, ext. 12, #22). Never a plain decimal (111110.0), a dotted quad, money or a short code. - SSN: 9 digits, optionally 3-2-4 with hyphens. Never an area of 000, 666 or 9xx, a group of 00, or a serial of 0000. - Date of Birth: 1900-2099, as YYYY-MM-DD, YYYY/M/D, MM/DD/YYYY or DD.MM.YYYY, with at most a midnight time. As before, the bootstrap never updates an existing Egeria element: the specifications and specificationDetails reach a fresh seed, and the inferred rule covers classes already in Egeria. Tests: test_tr131_value_and_name.py (67) covers: - good and bad values per class, and the Luhn check; - generic marked and inferred; - the name test; - the Architect's false-positive columns as fixtures (NOT matched), and real-named columns (matched); - name_only unchanged, and unknown checks failing closed. 38 of them fail on 02d2416. Against a6e148d's regexes, 21 of the 24 false-positive cases match. test_tr127_dataclass_seed_name_hints.py is updated: its "only Email ships a specification" pins are now TR-131's "every class but Password does, generic ones marked", and its seed self-test reads back specificationDetails. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…es, set Branch on the default root folder (gated) First increment of "a repository's branches" (Dan: option C, sparse trees later in C2, cap 5 in C2). C1 records and lists; it creates no Egeria element: no branch folders, no sparse trees, no deep survey of other branches. - pyegeria >=6.3.2 (the first release with DevopsPipeline.set_element_as_branch); `uv lock --upgrade-package pyegeria` moved pyegeria 6.3.0 to 6.3.2 and no other package's version (12 packages' dependency-edge markers simplified). - github/client.py: list_branches (metadata only: name, head SHA, protected; no per-branch date, it costs a request each; capped at 500 with a flag) and resolve_ref (a branch, else a tag, annotated tags dereferenced, else a commit; anything else UnknownRef). - registry: repo_branch_runs, one row per ref per run (surveyed or listed), additive and created by `schema apply`, never by a pod in external mode; record_repo_branch_runs / list_repo_branch_runs / set_repo_branch_outcome; the newest 10 runs are kept; removing the repository removes them. repo_branches.record_repo_branches resolves, lists and stores, and says in words what it could not do. - The survey: the ref the run read goes on its step_runs metrics (surveyed_ref, ref_kind, surveyed_commit) and on the published SurveyReport's additionalProperties (the subject stays the repository). The commit is the one the run READ (the SHA the zipball or clone served), and the repository object the acquisition already fetched is reused (no second lookup). - egeria_publisher: the Branch classification on the repository's EXISTING root folder, only when the ref is the default branch, the platform carries 6.4 and pyegeria has set_element_as_branch; idempotent (same four values: no call; a renamed default: one update); a failing gate sets nothing and says which, in words, stored on the default's row with the folder's GUID. - The repository card: ONE line, "Branches: main surveyed · N listed", the list only when opened. scouting-overview carries `branches`. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…he platform version synchronously W1 (a real bug): _read_branch_classification read elementHeader.classifications, but Egeria 6.4 has no header key for Branch, so it arrives under elementHeader.otherClassifications (the Portal's e64_fixtures documents it; its branch_of scans every header value). Live, an existing Branch would have read as absent and every publish would have called set_element_as_branch again. It now scans EVERY header value (lists and single classifications), plus the older top-level shapes. Tests use the 6.4 shape: already set makes no call; a rename makes exactly one update; none makes one set call. W2: _egeria_carries_6_4 ran pyegeria's async gate in a new event loop in a pool thread, over a client whose async transport belongs to another loop, which can fail with a different-loop or closed-transport error and return (None, ""), so Branch would never be set. It now reads the platform's origin answer (name, version, time) with the sync client and calls pyegeria's sync carries_6_4. Tests: True for a 6.4 payload, False for 6.3, (None, "") for an unreadable answer, none of them touching the async gate. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…it near miss is inconclusive; blank cells are missing Architect read-back of c489889 (READBACK-TR131-c489889d-2026-11-22.md): the rule had no false positives on real data, but two gaps hid genuine matches. W1, phones: customers-100 Phone 1/2 and people-100 Phone conformed only 0.79-0.83. About a fifth are written with the "001-" international dialing prefix (001-808-617-6467x12895), which the NANP branch did not accept, so a Phone-named column of phone numbers got an ESTABLISHED no_match. - The Phone specification now accepts a 00 or 011 exit code in front of both the North American and the international forms (001-808-617-6467, 011 44 20 7946 0958, 0044 20 7946 0958). - New rule: a column whose name passes a class's names and whose values conform between NEAR_MATCH_FLOOR (0.60) and the 0.95 threshold is MATCH_INCONCLUSIVE, never an established no_match. The reason names the class and the fraction, and the class is listed in other_candidates with a near_miss_reason. It is inconclusive rather than partial_match because table_preview and column_profile_step count partial_match as a match (it is the reference-data partial), so it would show and publish the class. W2, blank cells: userdata.parquet birthdate is 23% "" (cc too), so a genuine Date of Birth column read no_match. file_class_match.sample_values now drops strings that are blank after strip, and NaT, as it already dropped None and NaN: in CSV, Parquet and JSON lines an empty cell is missing data, not a value. Real-data check B, re-run read-only with the Architect's script (egeria_v6's newest profile, the files' heads from disk, this seed): matched Email Address 12, Date of Birth 7 (the 6 genuine columns plus userdata birthdate), Phone Number 3 (customers-100 Phone 1, Phone 2, people-100 Phone), Credit Card Number 1 (userdata cc, Luhn-valid); no false positives and no near-miss columns. Tests: 10 more in test_tr131_value_and_name.py (77 in all). They cover the exit-code values, the three real-shaped phone columns, the near-miss verdict, and a 77% dates + 23% "" column through the real file sampler (CSV and Parquet) matching. 8 of the 10 fail on c489889; the other two are meant to pass both ways. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A step whose flow run was cancelled stops with run_cancellation.RunCancelled (TR-62b), and TR-93 counts it as cancelled, not as an error. Its run event still said FAIL with an errorMessage facet, so a lineage consumer read a person's cancel as a broken job. openlineage.finish now emits ABORT for RunCancelled and asyncio.CancelledError, with the end time and no errorMessage; an ordinary raise and note_failure stay FAIL, a clean step stays COMPLETE. Tests: tests/test_tr90_cancel_emits_abort.py (8): START then ABORT for a cancel, same run id, end time, no error facet; an asyncio cancel; a nested step under its demander aborts both; FAIL and COMPLETE unchanged; both events counted as delivered on the step row. 4 of the 8 fail on 4867b7b (the other 4 pin what must not change). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
resource-explorer survey-definition said 'no one is signed in' right after a successful login: it never called cli_session.require_and_activate(console), which every other Egeria command does, so the cached session was never read or activated. The command reads the Survey Definition from Egeria, so it now requires the session (exit 2 with the one-line sign-in message when there is none) and runs as that person. The database and filesystem survey-definition commands read their definition from Egeria the same way and had the same gap, so they get the same one call. Tests: without a session each exits 2 with the login line and runs nothing; with one each runs with the caller context set to that person and their Egeria token. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…s' current name (TR-118) sentence-transformers 5.x renamed get_sentence_embedding_dimension to get_embedding_dimension and kept the old name as a deprecated alias, so EA logged a FutureWarning at every start (embeddings.py:156; 16 over 8 laz startups) and would break when the alias is removed. advisor.embeddings.embedding_dimension(model) takes the new name, falls back to the old one only for a model that has nothing else (the dependency floor is still >=2.2.0), and says so in words when a model has neither. EmbeddingGenerator's two loads and the two scripts (convert_to_onnx, test_end_to_end) use it. Tests: tests/unit/test_tr118_embedding_dimension_name.py (6): the current name is used with warnings as errors, an older model with only the old name still answers, a model with neither raises in words, and no caller in embeddings.py or the two scripts calls the deprecated name directly. The file fails to collect on 4867b7b (no embedding_dimension). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…apply) bootstrap_data_classes reconcile lists, per class the seed names, the seed-owned fields that differ from Egeria: matchPropertyNames (from dataPatterns), specification, and the requiresNameMatch and valueCheck keys of specificationDetails (TR-131). displayName and description are not seed-owned (people edit them) and are never read for a difference. It is a dry run; --apply sends a merge update with only the differing fields and reads each class back, and an update that did not take is reported, not counted as done. The specificationDetails map is sent as it is with only the seed's keys changed (Egeria merges per property, not per key), so another key in it survives. Never a delete, never a class the seed does not name (it is not even read), never a class missing from Egeria (the bootstrap creates it); a second apply sends nothing and says 'no changes'. Egeria's merge update skips an empty list or map (6.4 PropertyHelper) and sends a string, so emptying a list or removing a key is reported as 'needs a replace update; not applied' in the dry run and after --apply, never sent; a blank string specification is sent. python -m ...bootstrap_data_classes reconcile [--apply]; the bare command still seeds. Based on claude/tr131-value-and-name (24701b6), which defines the markers. Tests use a fake Egeria that applies merge updates the way Egeria does. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
README.md tells a newcomer to copy mcp_servers.json.example, whose pyegeria env said EGERIA_USER erinoverview (a persona) and EGERIA_PASSWORD secret, so a copy ran EA's MCP server as a person with a password in a file. EA runs that server as its own service account (TR-34: EA_DAEMON_USER_ID / EA_DAEMON_USER_PASSWORD in EA's .env) and drops any identity found in this JSON, so the example now carries only the connection settings and a comment saying so, and the README says the same where it tells a newcomer to copy it. Tests: the example is valid JSON, sets no identity or password variable, names no persona or secret value, and says it runs as the service account; so does the README. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… when it did prefect_up.sh records the PID of 'nohup env ... uv run ... prefect worker', a wrapper; prefect_down.sh killed only that PID, printed 'Stopped worker', and left the 'prefect worker' child running. It now stops the process tree (children first), waits up to PREFECT_DOWN_WAIT seconds (default 10) for every process in it to exit, treating a zombie as gone, and prints 'Stopped' only then. A process that is still alive is named, left alone, and makes the script exit 1 with the pid file kept so a second run tries again. The server is handled the same way. Tests use a bash parent/child stand-in for the wrapper/worker: both die, the server tree too, a child that ignores SIGTERM is not reported as stopped, nothing running and a stale pid file say so. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A survey without GITHUB_TOKEN of a 59-commit repo exited 0 with 'Stats fetched (0 commits stored)' and no reason: the
wizard printed result.get('commits_fetched', 0), so a missing count read as 0; the latest-SHA fetch was swallowed with
'except Exception: pass'; and the retry advice named 'project-explorer refresh', which no longer exists. A shared
github/stats_summary.summarize now writes the line for both the wizard and 'refresh': the fetch error when there is one,
'commits not fetched: the fetch returned no commit count' when there is no count, and without GITHUB_TOKEN the reason
(GitHub allows 60 requests an hour, so history and diff stats can be empty or partial) on any count. The SHA failure is
printed as a warning (no refresh baseline), and the retry names 'resource-explorer refresh <slug>'. Tests: each case in
the wizard's _post_ingestion, and the shared line for refresh.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
On laz EmailAddress's matchPropertyNames was hand-updated to [email, email_address, Email, emailaddress]; replacing it with
the seed's list would have dropped 'Email' and 'emailaddress'. reconcile now sends Egeria's list as it is (its order) with
the seed's missing keywords appended, reports only the additions ('+ [...]'), and a list that already covers the seed is no
change, extra keywords or not. Same principle as the specificationDetails map: what people added in Egeria is theirs. On
laz the EmailAddress dry run shows + ['mail_addr', 'emailaddr'].
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The Portal's Trellis tile reads 'Not configured' unless the QuickStart's EGERIA_ADVISOR_SSO_SECRET and the apps' TRELLIS_PORTAL_SECRET are the same value; QUICKSTART never mentioned either. It now explains the pairing, that it must be the same value, what the tile says without it, and how 'make up' (trellis-up) copies it from the QuickStart's .env when it can find it (a sibling egeria-workspaces, or EGERIA_WORKSPACES_FS), and that it never invents one. trellis-up's 'not set' message now says how to point it at the checkout or set the value by hand. Tests: the copy into all three .env files (mode 600), the message and what is not written when the QuickStart .env is absent, and the QUICKSTART text. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Without a token GitHub allows 60 requests an hour, which one survey of a modest repository spends in its first calls, so
commit history, diff stats and contributors come back empty or partial. config.py defaults the token to '' and nothing
said so, and QUICKSTART, the deploy guide and the admin guide presented it as optional. Now: github/token_status.py
gives status() (booleans and a number, never the value), a WARNING at web and worker start-up (INFO when set), a
github {token_set, requests_per_hour} field in /health/ready, and one yellow line at the start of 'survey' and
'refresh'. QUICKSTART step 4 says to set it and what happens without it (and that RE warns at startup); the deploy-guide
row and the admin-guide line say the same. Tests: the status and log levels (no secret in any line), the health field,
the CLI warning once, and the three docs.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… names From the 2026-11-19 fresh-Mac install. 'Fifteen minutes, most of it waiting for model downloads' is replaced by the measured figures: QuickStart build about 24 min cold, the Egeria Advisor knowledge-base clone about 34 min (5.1 GB), ingest about 80 min, about 2 h 55 min clone to answer; the 10-minute path is named as Resource Explorer alone against an Egeria and Ollama already up. The schema command for the egeria-workspaces path now uses egeria-shared-postgres (trellis-postgres is the standalone container, and keeps its own command). The deploy guide's section 1.2 waited for a string that never appears; it now names the line the log prints: SERVER-OPS-0004 The qs-view-server server has successfully completed start up. Both documents now say the demo password is QUICKSTART_PERSONA_PASSWORD in egeria-workspaces' .env. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…laz (TR-104)
repo_refresh_plan took StepInfo's default fetch_cost="none", and every run logged the step-cost disagreement "declares
fetch_cost='none' but opened N connection(s)". Measured read-only on laz's registry (resource_explorer.step_runs,
2026-11-23T20:48Z): 703 recorded runs from 2026-09-24 to 2026-11-23, every one made exactly 2 API calls, all to
api.github.com:443 (get_repo + get_latest_commit_sha: the head commit the plan compares stored runs against); the
socket count was 1 to 25, median 3. The step needs the head commit, so it cannot stop fetching: it now declares "api".
Consequence: a max_fetch_cost="none" run (bulk republish, "keeps it to stored data") leaves the planner out, where it
made two GitHub calls in a run that promised none. Engine-host dispatch is unchanged ("api" is not a heavy fetch; the
step stays survey-invalid there, for the same reason as before). The generated engine-host declaration
(steps/repo-steps.md) is regenerated: its fetch_cost row reads api.
Tests: tests/test_tr104_refresh_plan_fetch_cost.py (4): the declaration is api; laz's min, median and max measured
runs no longer disagree with it; the head lookup is the two GitHub calls measured; a "none" run leaves the planner out
and an "api" run keeps it. 3 of the 4 fail on 4867b7b.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…igned in as (TR-42) In U3 (2026-11-17) "no NPA sign-in in the log" was a void check: EA never logged who a v2 answer ran as, nor the user pyegeria minted a token for, so the absence of a service-account name proved nothing (absence-as-answer). - spec_authoring_v2.answer logs one INFO line per run: "v2 answer as <user> via bearer token", or "with no bearer token". Both callers (the chat elicitor and Execute Spec on a v2 document) go through answer(). - auth.apply_token, the chokepoint before every live Egeria call, logs "Egeria token minted for <user> (password sign-in)" when it has to mint; a caller's own bearer token is not a mint and logs nothing. Names only: never a token or a password. Tests: tests/unit/test_tr42_ea_run_identity_logged.py (6): the v2 line with and without a token, logged once for a run that reaches the preview, no secret in the log, a password mint names its user, a supplied token logs no mint. 4 of the 6 fail on 4867b7b (the 2 secret/no-mint checks pass there too and pin what must not change). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… (TR-58) The TR-34 deploy check (2026-11-18) could not show from EA's log that the sync signed in as its service account (egeriaadvisornpa on laz): the line held only counts. sync_now now names the account in both lines: "Report spec sync from Egeria as <account> (<folders>): N added, ..." and "Report spec sync from Egeria as <account> failed: <why>". The account is the connection's user id (or the injected client's); a failure before any is known says "(account not known)". Never the password. Tests: tests/unit/test_tr58_spec_sync_logs_account.py (3), on the existing fake Egeria: a completed sync, a failed one that had a connection (and no password in the log), and one that failed before any account was known. All 3 fail on 4867b7b. test_egeria_spec_sync.py unchanged and passing. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… (TR-59) On laz the sync line read "0 added, 0 updated, 0 unchanged, 0 pruned, 0 skipped" on every startup (11-17 16:53, 20:44, 11-18 22:22Z), and the same words would have been printed for a folder that was missing or unreadable (absence-as-answer). Read-only check first, as the register asked (laz's Egeria store, 2026-11-23T20:59Z): ReportSpecFolder::Consumer::EgeriaAdvisor exists, ACTIVE, with no members (only the Portal consumer folder holds specs, 3), so laz's 0 was true and not a read bug. The line now ends with each folder's result, from the same status the admin page shows: "<folder>: found, N members read, holds no active report specs" (or "holds N active report specs"), "<folder>: not found, or not visible to <account>; nothing read", "<folder>: could not be read (<why>); nothing read", or "no folder configured; nothing read". With several folders found, the members-read count is given once "in all" (pyegeria's report does not split it by folder). Stacked on TR-58 (df14f2e), which names the account in the same line. Tests: tests/unit/test_tr59_spec_sync_says_what_it_read.py (5): an empty folder, a missing one, one held spec, a draft read but not held, and no folder configured. All 5 fail on df14f2e. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…e symbol store (TR-102) A socket/psycopg2 guard (Architect, TR-98 read-back 2026-11-20) caught four real Postgres connections in EA's unit suite, all in test_ingest_collections: scripts/ingest_collections.py clears each collection's code symbols through get_symbol_store() -> CodeSymbolStore -> a real psycopg2 pool on EA's configured database. With a password set that is a DELETE on the shared PG (laz 5442) from a unit test. The script catches the failure and logs a warning, so the tests passed either way. - tests/unit/pg_guard.py + an autouse fixture in tests/unit/conftest.py: every unit test has psycopg2.connect and socket connects to 5432/5442 refused; each attempt is recorded and the test FAILS at teardown naming it, so a swallowed attempt cannot pass. The opt-in tiers (requires_pgvector, ea_test_schema: a throwaway schema, gated by tests/conftest.py on a supplied password and a reachable server) are not guarded. - test_ingest_collections stubs get_symbol_store with a fake for the whole file, and pins that an ingest clears its collection's symbols once, through the store. Tests: tests/unit/test_tr102_no_real_postgres.py (5): psycopg2.connect refused and recorded, sockets to 5432 and 5442 refused before connecting, a swallowed attempt still recorded, opt-in tiers unguarded; plus the new ingest pin. On 4867b7b the new file fails to collect, and the guard alone turns the 4 unstubbed ingest tests into errors (the Architect's 4 hits). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
/health/ready is the unauthenticated readiness probe (k8s, the chart canary, the Portal tile). Whether a GITHUB_TOKEN
exists and its rate budget is a configuration fact, not readiness, and on an exposed /health it tells anyone whether a
token is set. The startup WARNING and the CLI line already cover TR-53, so the github {token_set, requests_per_hour}
field is removed, along with the two doc sentences that pointed at it. If a status surface is ever wanted it belongs on
an authenticated endpoint. The test now asserts /health/ready says nothing about GitHub or tokens, with or without one.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
After a reboot or crash .prefect-run/*.pid survives and its pid can be reused by any process; _stop only checked that the pid was alive, then sent SIGTERM to it and every descendant. It now reads the process's command line (ps -o args=) and acts only when it contains 'prefect worker' / 'prefect server' (the wrapper line prefect_up.sh starts has it). Anything else prints 'pid N is not a Prefect process (stale pid file); not touching it', removes the pid file and kills nothing, children included. Tests: a pid file pointing at an unrelated live process (sleep) is left alone, reported, and the file removed; the same for one with children; and a prefect server under worker.pid is not stopped as a worker. The earlier stop and survivor tests give their stand-in the command line prefect_up.sh's wrapper has. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… said at startup and in /api/status (TR-60a)
TR-60: EA's tables are unqualified. Connecting as the role egeria_advisor (TR-12), whose search_path is "$user",
public, it resolved them to the schema egeria_advisor (the feedback store's, deliberately there), where startup had
created EMPTY copies, and answered 18 questions from 0 rows with nothing flagged. laz was fixed by a role setting
(ALTER ROLE ... SET search_path = public, 2026-11-18). This is the durable fix from the Architect's ruling, point 2:
EA no longer depends on the role's search_path.
- trellis-vectorstore: PgVectorStoreConfig.options (libpq options), sent on every connection the store opens (the
pool, the bootstrap, the declared-collections read). None sends none, so RE is unchanged.
- EA: config.EA_PG_OPTIONS = "-c search_path=public", sent by the vector store and the consolidated DB pool
(operational SQL: metrics, code symbols, sessions). A connection option overrides the role's default. The feedback
store stays schema-qualified in egeria_advisor, as ruled.
- advisor/knowledge_base_check.py: startup counts every enabled collection in the background and logs a WARNING naming
each empty one ("Every enabled collection is EMPTY in schema public ..."); /api/status carries it as knowledge_base:
not_checked | ok | partly_empty | empty | unread.
Read-only proof on laz's shared PG (2026-11-23T21:22Z, admin session, default_transaction_read_only): a session opened
with EA's options has search_path=public, current_schemas {public}; public.pyegeria 6464, egeria_java 61433,
egeria_workspaces 17622, egeria_concepts 621 against the never-analysed empty copies in schema egeria_advisor. The role
setting {search_path=public} is still in place; with this deployed it is no longer needed, and resetting it is a shared
write left for Dan's word.
Tests: trellis-vectorstore tests/test_pg_connection_options.py (3), all fail on 4867b7b; EA
tests/unit/test_tr60a_ea_names_its_schema.py (11: the option, the vector store and pool send it, empty / partly empty /
ok / unread, not_checked, /api/status), which fails to collect on 4867b7b; plus a requires_pgvector read-only check
that a live connection with EA's options reads public only (skipped without a supplied Postgres).
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A new workspace package (import name trellis_llm); neither RE nor EA imports it yet and no app file changes (steps 2 and 3). ChatModel.complete() and .stream() return Completion(text, model, provider, usage, applied, ignored, finish_reason). usage is prompt/completion tokens and None when the provider does not report them, never 0. A parameter a provider drops is named in `ignored` with a reason, logged once per (provider, parameter), and never sent (num_ctx on /v1; top_k and repeat_penalty on OpenAI; num_ctx, repeat_penalty and seed on Anthropic). finish_reason is added beyond the brief: a reasoning model cut by length returns text == '' (seen live on laguna-xs-2.1), and this is how a caller tells that from an empty answer. Providers, each an optional extra imported only when chosen: ollama (native /api/chat, num_ctx always sent), openai_compatible (the official openai client, explicit base_url, no default), anthropic (RE's current behaviour: default system prompt, max_tokens 4096). A missing extra names the extra to install; `import trellis_llm` imports no provider library. One resolver, resolve(app): <APP>_LLM_* > TRELLIS_LLM_* > the app's legacy names (RE LLM__*, EXPLORER_MODEL_TIER; EA OLLAMA_BASE_URL, OLLAMA_MODEL, OLLAMA_CODE_MODEL, ADVISOR_MODEL_TIER, advisor.yaml as data; each warns once) > defaults. Slots via <APP>_LLM_MODEL_<SLOT>; tiers (dev, demo-gpu, demo-cpu) apply to ollama only; a missing model for openai_compatible or anthropic is a startup error in words, never an Ollama name. A base_url that is not loopback or private (a hostname counts only if every address it resolves to is; an unresolvable one fails closed), or the anthropic provider, needs <APP>_LLM_ALLOW_REMOTE=true. One startup line says provider, host, model per slot and where prompts go; the API key (a Secret) is never in it, in any log record, repr(settings) or an exception message, even when a server echoes it back (the SDK exception is not chained). Tests (76, no network): the official clients run for real against recorded HTTP replayed through httpx.MockTransport (no new dev dependency). The openai_compatible and Ollama fixtures were recorded 2026-11-23 from a local LM Studio (qwen3-coder-next, laguna-xs-2.1) and a local Ollama (llama3.1:8b); the Anthropic ones are hand-written in the documented wire shape, not recorded (fixtures/README.md says which is which). uv.lock gains only the trellis-llm entries, applied by hand: this Mac's uv (0.13.8) rewrites the whole lock at another revision. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… a member it cannot export is refused (TR-121)
Since TR-54 A1 an import adds an `open_data` member to the investigation's Folio. export_inventory wrote those
members but no open_data rows, so every such export failed verify ("references unknown open_data ...") and any later
restore would recreate members pointing at nothing. Architect's ruling: export and verify integrity; restore is out of
scope.
- `open_data`: the stored row (as in the table, ready to re-insert) of each dataset an investigation member points at,
sorted by slug. Only those: a dataset on a work list alone is not a registration an investigation depends on.
- A member whose dataset cannot be exported (not in the table, or the table unreadable) is LEFT OUT of the
investigation's members and listed in `refused_members` with the reason in words. verify() reports each as "refused
at export", so the script exits non-zero; nothing is written dangling.
- verify() counts exported datasets as known members; the manifest counts open_data and refused_members.
FORMAT_VERSION 2.
The open_data table is read only when a member points at a dataset, so a registry with none is never asked.
Tests: tests/test_tr121_export_open_data_members.py (6): the pointed-at datasets exported and verify clean; an exported
row is the stored row; a member whose dataset is gone is refused in words, not written, and verify says so; a
work-list-only dataset stays out; a hand-edited dangling member is still caught; the format version. 5 of the 6 fail on
4867b7b. test_inventory_export, TR-54 A1/A2 and the vocabulary tests pass unchanged (77 in all).
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
On laz, `uv lock --check` passed on main 4867b7b and failed on fdb3c59. Two hand edits, nothing else: trellis-llm is added to the [manifest] members list (between trellis-feedback and trellis-microflow), and the extra blank line before the trellis-microflow package entry is removed, so one blank line separates the entries as uv writes them. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…one Funnel Stages glossary (TR-117) RE's questions batch (scouting-questions.md) failed 17 of 647 commands on every heal: `Link Element To Scope` with Scope Reference 'Assessment'. Read-only on laz's Egeria store (2026-11-23T20:55Z): three ACTIVE elements are called "Assessment" (our Funnel Stages term Coco Pharmaceuticals::Term::Assessment::1.0, the DataFieldNaming glossary term GlossaryTerm::DataFieldNaming::Assessment, and Egeria's ValidMetadataValue typeName-(Assessment)), so Dr.Egeria's resolver says "Multiple elements found ... use a unique Qualified Name". Every other stage name is unique. The term's qualified name carries the install's local qualifier, so it cannot be written into the document. Ruling (a), a narrow workaround to retire when PY-73 lands: before the dr_egeria child processes a document, dr_egeria_scope_refs reads the ONE glossary named "Funnel Stages" (exactly one, by exact display name) and its members (CollectionMembership, paged), and rewrites each Scope Reference / Scope Category value inside a Link Element To Scope command that names one of its terms to "<name> (guid:<guid>)", the form Dr.Egeria's resolver takes a guid from. A rewritten copy in a temp directory is processed and removed after; the document itself is never written. The child prints one line saying how many references went as guids and which names, or why none did. A document with no scope link makes no Egeria read; if the glossary is not exactly one, the document runs as written and the reason is printed. Tests: tests/test_tr117_scope_refs_as_guids.py (9): only values inside the command are touched; a term is rewritten, everything else byte-identical, original untouched; a glossary lookup failure sends the document as written; no read for a document without scope links; the glossary read takes the exact name, pages members and drops a duplicated name; a missing glossary is refused; the real questions batch has every scope value rewritten given foundations.md's names (17 of them 'Assessment'); the report line does not hide dr_egeria's summary; the child processes the rewritten copy, prints the line and removes the copy. The file fails to collect on 4867b7b. The live heal (a shared Egeria write) waits for a peer round and Dan's word. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ks (TR-121 read-back W-121-1)
FORMAT_VERSION 2 with the strict check made every existing v1 backup fail verify ("format_version 1, expected 2").
verify() now accepts versions 1 and 2 and refuses any other (wrong type included) with "format_version X, expected one
of 1 or 2". For a v1 export it skips the manifest keys v1 never had (open_data, refused_members) and does not flag its
open_data members, whose datasets v1 never exported. A new notes() says so in words instead of a problem: "v1 export
(before TR-121): open_data datasets not included; N open_data member(s) in it point at datasets it does not hold".
scripts/export_inventory.py prints the notes as NOTE lines; they do not change the exit code.
Tests (7 new in tests/test_tr121_export_open_data_members.py, all failing on 69d0f85): a v1 export verifies, with
that note and its member count; a v2 export verifies with no notes; versions 0, 3, 99, None and "2" are refused.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…es (TR-117 read-back W-117-1) Ruling (a) asked the child's report line to say what it did not rewrite as well as what it did. The line now adds "M left as names: <distinct values>" (a value naming no Funnel Stages term, or already carrying a guid), in all three shapes: "N scope reference(s) sent as guids ... (names); M left as names: ...; retire when PY-73 lands", "nothing rewritten; M left as names: ...", and "0 left as names" when every value was rewritten. Rewrite carries left and left_count. Tests (3 new in tests/test_tr117_scope_refs_as_guids.py, all failing on 5bdd898): two left named beside two rewritten, none rewritten names all four, all rewritten says 0 left. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…as names" (TR-117 read-back W-117-2) W-117-1 counted a value that already carried "(guid:...)" as "left as names", and its test pinned that, so a heal log for a document that is entirely fine would show a non-zero "left as names". The report line now reads "N scope reference(s) sent as guids ... (names); K already guids; M left as names: <names>" (and "nothing rewritten; K already guids; M left as names: ..."). "Left as names" is only a value naming no term of the Funnel Stages glossary, or one whose name is duplicated in it. M counts distinct values, matching the list it introduces; Rewrite gains `already`. Tests (tests/test_tr117_scope_refs_as_guids.py, 14): the W-117-1 tests corrected (Answered At is already a guid, so only Somewhere Else is left; with no terms, 1 already and 3 left; all rewritten, 0 and 0), plus: guids counted apart and a repeated name counted once; the real questions batch leaves nothing as a name. 5 fail on 1934b2e. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…refresh_plan (TR-104 gate fix) test_survey_orchestrator's TestCostTierFilter pins, by name and with a reason each, every step a max_fetch_cost="none" run excludes. TR-104 (8415539) made repo_refresh_plan declare "api", so the set gained it and the full RE gate failed that test both env ways. Added with its reason: 703 laz runs made exactly 2 api.github.com calls each, so a "none" republish from stored data leaves it out (the consequence the Architect ruled acceptable in read-back). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
cli.session.activate() sets a2a_auth.current_caller and never resets it, which is right for a CLI process. TR-61's login test runs the survey-definition commands in-process through typer's CliRunner, so the caller it set stayed set for the rest of the pytest worker; a later per-user test (test_web's TestProjectsRouter working-set hiding) then wrote as one person and read as another. Gate b501 failed 4 tests that way. An autouse fixture now snapshots and resets current_caller, _acting and _scope around every test. Product code is unchanged. Proof: test_tr61_survey_definition_session.py followed by TestProjectsRouter in one process: 4 failed before, 27 passed after. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…pgvector tier
TR-102's pg_guard exempts opt-in Postgres tests by the requires_pgvector
marker or a static ea_test_schema request. test_feedback_library's and
test_feedback_import's fixtures request ea_test_schema dynamically
(getfixturevalue inside the postgres branch), after the autouse guard has
already decided, so gate b501 refused all 18 [postgres] variants.
Declare the tier statically on the param instead:
pytest.param("postgres", marks=pytest.mark.requires_pgvector). The guard
exempts them, tests/conftest.py's tier rules apply (skip without a
password, fail under TRELLIS_REQUIRE_PG), and the sqlite variants stay
guarded.
Proof: without PGVECTOR_PASSWORD, 30 passed / 18 skipped; with CI's
password, 48 passed (incl. test_tr102_no_real_postgres).
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>
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>
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>
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>
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-23: data-class value and name matching (TR-131/135), repository branches (TR-132 C1), a shared LLM package (TR-38 step 1), and 16 fixes across RE and EA
Twenty reviewed branches, merged onto main 4867b7b. Each has one merge commit; every commit is signed and carries Signed-off-by.
Resource Explorer
bootstrap_data_classes reconcilelists the seed fields that differ in Egeria (a dry run), and--applyupdates only those fields. A field it can't clear is reported, not applied (TR-137). W-135-1 unions the property-name keywords, so hand-added names survive./health/ready.max_fetch_cost="none"republish now leaves it out.prefect_downstops only a process that really is the Prefect worker or server, so a stale pid file can no longer kill an unrelated process tree.Egeria Advisor
search_path=public(a new trellis-vectorstoreoptions; None leaves RE unchanged). There's a startup warning, and an/api/statusfield, when enabled collections are empty.requires_pgvector.Shared
trellis-llmpackage:Tested
Changes in behaviour
max_fetch_cost="none"skipsrepo_refresh_plan.Deploy notes
bootstrap_data_classes reconcile --apply(TR-135). On a pre-TR-131 RE, the new value regexes would match without the name or Luhn guards.--apply.ddl/optionsparameters without a version bump (TR-139). An environment that installs them from a package index rather than this workspace needs that bump first.reconcile --apply(TR-135) and the TR-117 heal are each a deliberate, coordinated operator step on the target installation. The counts depend on that installation's data.🤖 Generated with Claude Code