Skip to content

RE/EA bundle 2026-11-20: file-system survey definitions, start_action on definition runs, decimal sizes, TR-94, TR-51d - #1121

Merged
dwolfson merged 15 commits into
mainfrom
claude/bundle-2026-11-20
Nov 20, 2026
Merged

dwolfson merged 15 commits into
mainfrom
claude/bundle-2026-11-20

Conversation

@dwolfson

Copy link
Copy Markdown
Owner

The 2026-11-20 Resource Explorer / EA bundle: five read-back items, merged with merge commits (never squash: D1/D2 must stay one unit).

  • Item D: file-system survey definitions (Rocky; D1 + D2; read-backs PASS).
    • The file-profile, narrative and data-class-match steps can now run through the survey-definition executor. Each one calls the same press as its Run button.
    • Two survey definitions, Scouting and Analysis, in their own survey-definitions-filesystem/ batch with a canary, reconcilers and survey_kind. They're RE-led only; Egeria's Folder Survey isn't part of them.
  • TR-95 (security): starting a survey definition checks start_action for every resource type. This covers the run route, schedule run-now, saving a survey schedule and the work-list batch, so it's the same decision as the individual Run buttons.
  • TR-81: one decimal size formatter. Every size labelled KB/MB/GB goes through one helper per language, so the inventory headline, the card, chat, the reindex estimate and the chart agree.
  • TR-94: test margin. /health in test_ask_route_off_the_loop now allows 0.8 × the sleep, so it stays stable on slow runners and still fails on a real block. The change was written by qwen3-coder-next in a tool loop.
  • TR-51d (EA): symbol-store and command-index answers report the sources they read and the lookup time; they say "none" only when nothing was read.

Gate: b469, on tree e184da2b (identical to this branch's tree).

  • RE main suite: 15,651 passed, 0 failed.
  • JS harness: exit 0. Analytics: 294/0.
  • egeria-advisor: 1,530 passed (base 1,517), 0 new failures.
  • Other packages: no new failures.

Every commit is signed, with Signed-off-by only.

Deploy notes for 8813:

  • RE start heals the new survey-definitions-filesystem batch. That writes to Egeria and isn't idempotent, so it needs a peer round, a canary read first and exactly one heal.
  • After the deploy, check that the Analytic Library steps are attached.
  • After TR-95, every survey-definition run needs a signed-in caller.

Signed-off-by: Dan Wolfson dan.wolfson@pdr-associates.com

🤖 Generated with Claude Code

…TR-95)

run_survey_definition_route checked only publish, and only when a Project
was assigned, so a caller the individual Run routes refuse could start the
same work by running a definition. It now asks start_action first, for repo,
database and filesystem, before anything is queued; the publish check stays.

The quality batch queues definition runs for a caller too (web press and the
schedule's creator) and had the same gap; definition_batch_refusal adds the
start_action check there.

Existing run-route tests that posted with no signed-in caller now use
open_access.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
/health took 1.15 s on a GitHub runner against a limit of SLEEP_SECONDS / 2 (1.0 s), while a real event-loop
block makes it wait at least SLEEP_SECONDS (2.0 s). The limit is now 0.8 * SLEEP_SECONDS (1.6 s): a slow runner
passes, a real block still fails.

Written by qwen3-coder-next through a Claude Code tool loop on LM Studio (it read the file, made the edit and ran
the test three times itself); reviewed by Claude.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…anguage (TR-81)

The same 60,209,097 bytes read "57.4 MB" in the Discovery inventory headline
(1024-based) and "60.2 MB" in the survey card's price line (decimal); the
original report was 8.4 GB vs 7.8 GB. Rule: 1 MB = 1,000,000 bytes wherever a
size is labelled KB/MB/GB; binary only where the words say KiB/MiB/GiB.

Python: new resource_explorer/byte_format.py (format_bytes). The filesystem
walk_derived/walk_extensions, filesystem and database survey-definition
adapters, catalogue_scope, quality_batch, open_data profile, data_profiler and
file_size formatters now delegate to it (function names kept for callers).
JS: fmtBytesDecimal in stages/native-report.js is the one implementation;
fmtBytes there is an alias, and app.js, first-index.js, repo-report.js,
report-tables.js and repo-header.js use it instead of their own 1024 maths.

Visible consequences: a 1024-based fixture now reads larger (22 MiB is
"23.1 MB"); the open-data profile cap, 50 MiB, now says "52.4 MB"; sizes of
a TB or more read in TB. "hashing stopped at 2.0 GiB" is untouched.

Tests: test_byte_format_decimal_tr81.py and tr81-decimal-sizes.test.mjs added;
expectations that encoded the old binary figures updated.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
What each route checks now, exactly:
- Survey Definition run route and the quality batch (web press and
  scheduled work-list batch): start_action, then publish when a Project is
  assigned. (The repo and database analysis Run routes check publish; the
  filesystem and native-survey routes check start_action.)
- Schedule "Run now": start_action on the resource, for every schedule that
  is not a work-list schedule (a work-list schedule is checked per member).
- Saving an enabled schedule whose target is a Survey Definition:
  start_action, then publish.

A work-list schedule with no recorded creator follows the no-requester rule
(person_write_refusal): its members run when no zone is in use, and are
refused with "no requester" words, not "sign in to curate", when one is.
person_write_refusal takes an optional reader for this.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…efinition executor (item D1)

Only filesystem_inventory was registered in the filesystem adapter's re_analysis_steps, so a
definition that chained file_profiles, narrative_docs or file_data_class_match reported each as
"not run: unknown step". Register the three, each calling the same press its Run route calls
(run_file_profiles, run_narrative_docs, run_file_class_match), so there is no second
implementation. A press's own refusal (nothing profiled, already running, not reachable) still
propagates and becomes the step's error, never an empty success.

Tests: registration and descriptions, each runner calls its press, each refusal propagates, and
two executor-level tests (each step runs through SurveyDefinitionExecutor; a refusal is the
step's error). The executor tests fail on the previous adapter with "unknown_step".

Item D1 of the rework of ee4ac1d. Written by qwen3-coder-next (LM Studio), reviewed and
corrected by Claude on Rocky.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…refusal words on the step entry

R1: two tests run the real narrative_docs press through SurveyDefinitionExecutor against a temporary
registry holding a real-shape walk. One asserts the step_runs row the press writes and the passages stored;
the other asserts a step that read nothing (a binary narrative file) says "0 files read in full" in its
detail and stores nothing, so a zero-result run is not read as a success with 0.

W1: every other press refusal (AlreadyRunning, ClaimLost, NothingToRead, NotReachable, NothingToMatch,
NotStored) is tested through the executor.

W2: the executor's error step entry now carries the refusal words as `detail` (as well as `errors`), and an
ok step whose output has `words` carries them as `detail`. Each runner returns the same run words its Run
route shows, read best-effort so the words never fail the step.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Two definitions for "File System Directory", generated from filesystem_survey_types.csv by
scripts/generate_filesystem_survey_definition.py, in docs/dr-egeria/survey-definitions-filesystem/:

- Filesystem Scouting Survey (scouting): filesystem_inventory, fs_layout_signals, fs_change_rates.
- Filesystem Analysis Survey (analysis): filesystem_inventory, file_profiles, narrative_docs,
  file_data_class_match, fs_activity, fs_duplicates, fs_permissions.

Resource Explorer leads both: every step is executes_at resource-explorer, and Egeria's Folder Survey is
stated as not part of them. resource_reachability and survey_price are stored states with no step, so the
generator refuses them as steps; it also refuses any step the executor would report as unknown, takes each
step's description from the adapter / installed step instead of inventing one, and fails (not warns) when a
Question term a ScopedBy block names is not authored in the questions batch.

The batch has its own _batch.json (requires engine-host; canary GovActionProcess::FilesystemAnalysisSurvey;
post_heal reconcile_filesystem_survey_definition_links.py; scope and executor-link checks), the committed
.generated_filesystem.json sidecar, and an entry in _folder_order.json. Both documents carry survey_kind.
The generator honours RE_SURVEY_DEFS_DIR, and tests/test_generate_filesystem_survey_definition.py covers the
clean-tree and hand-edit guards, runnability, scoping per document, and the missing-Question failure.
Reader-facing description of the two definitions added to the user guide.

Fixes the two gate failures of the earlier ee4ac1d attempt (test_every_generated_document_is_in_the_batch_manifest,
test_every_documented_definition_declares_its_filters_and_scoping).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…econcilers; clearer RE-led wording

W1: the two file-system reconcilers join the parametrisation in test_cli_scripts_daemon_identity.py.
W3: "Resource Explorer leads this definition: when Egeria can read the folder, Egeria's Folder Survey leads" read as a
contradiction. The CSV (so the generated documents and sidecar) and the user guide now say the definition is
Resource Explorer's own walk and does not run Egeria's Folder Survey; where Egeria can read the folder, that survey is
run from the folder-survey card instead and this definition's walk stops and says so.
W2 (noted): the reconcilers load SPECS at import, so a non-runnable step raises SurveyTypesCsvError there, as for the
database batch; said in the generator docstring.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ix-up 1)

Architect read-back of e1e905d found sites still labelled MB but 1024-based:
- agents/stats_agent.py and agents/tools.py gave repo_size_kb / 1024 as "MB", so
  chat and the repo-header tile showed the same repository two sizes; both now go
  through format_bytes (repo_size_kb is GitHub's KiB, so kb * 1024 bytes).
- reindex.needs_words said "needs about N MB" from bytes / 1_048_576; now
  format_bytes.
- db_chart_data sizes_mb (axis "Size (MB)") divided by 1_048_576; now 1_000_000.
- walk_extensions docstring said "2.0 GiB"; the words read "2.1 GB".

One test each (test_byte_format_decimal_tr81.py, test_parity_g3_routes.py); the
reindex test expectation for 3 MiB is now "3.1 MB". The open-data 50 MiB cap
("capped at 52.4 MB") is left as it is.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… (TR-51d)

TR-51c made the DocAgent and ExamplesAgent report their vector-search
sources. The Architect ruled the symbol-store answers the same bug: they
read a store, then returned hard-coded "sources": [], "num_sources": 0,
"retrieval_time": 0.0.

- agents/tools: record_lookup() and lookup_source() feed the request's
  retrieval log, as vector searches do. with_retrieval() adds
  retrieval_method: the stores read, or "none" only when nothing was
  read. With no log, nothing is claimed. Lookup sources carry no score
  (none is invented; consumers default a missing one).
- code_intel_agent: every symbol-store read goes through _read(), timed
  and recorded. Definition rows are sources (file, name, signature);
  aggregate reads (stats, class lists, hierarchy, inheritance) are one
  source each. A lookup that finds nothing counts its time, not a source.
- re_code_symbol_reader: each read is recorded the same way, so
  analytics.answer_quantitative_query (text only) now reports its reads.
- analytics: an answer from the cached metrics file names that file
  (analytics_cache), not the symbol store.
- rag_system: the structural and quantitative shortcuts share
  _quantitative_answer(); command discovery reports the commands it found
  (command_keyword_index), with the lookup time.

Tests: tests/unit/test_tr51d_symbol_store_answers_report_their_sources.py
(13, written first; all failed before the fix). EA tests/: 1447 passed,
83 skipped, 0 failed, run without PGVECTOR_PASSWORD.

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>
@dwolfson
dwolfson merged commit 068ac37 into main Nov 20, 2026
4 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