Skip to content

T100: the repo selector's declared tests, respelled to the carve (plan 038, T094's map R2-INV-R9) - #54

Merged
brettheap merged 5 commits into
mainfrom
r2/t100-repo-selector
Oct 7, 2026
Merged

brettheap merged 5 commits into
mainfrom
r2/t100-repo-selector

Conversation

@brettheap

@brettheap brettheap commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Authored by lane openXfactory-3, delegated by lane openxfactory-4 (#656 6021862323)

Arc: neutral-product-standalone-operability

T100: the repo selector's declared tests, respelled to the carve (plan 038, T094's map R2-INV-R9)

Contract. There is no tasks.md entry yet. Lane 4 records T095 to T104 after T002. The contract is T094's slice-outline row for T100 and the holder's rulings on the map, opensoft/openxFactory#656 comment 6021830531.

  • Realizes: the requirement 9 declared composed tests (T073, F9.1), for tests/test_repo_selector.py. It owns 24 composed reds, and its 7 host-registration nodes arrive with T095.
  • Falsifier: the composed run of the file, alone, goes from red to green. The unchanged set stays node-for-node unchanged, and tests/test_declared_exclusion.py stays green lone.
  • After: T095 (T095: the composed harness for the declared integration tests (plan 038, T094's R2-INV-R9) #46), LANDED as e2340bb6. main is merged in.

Ruled (#656 6021830531), as applied here:

  • R9-W1 (A″): the three Node harnesses copy display.js beside the model, with package.json, as T026's harnesses do. 17 nodes.
  • R9-R1 (a): the sparse-station node is handed the display /capabilities serves under the registered host, and asserts the served words. 1 node.
  • MN: SNAPSHOT_INDEX_ROUTE is read from openxdox.serve_projection. 2 nodes.
  • R9-W4: the plain-script and module subprocess tests register the host from THIS checkout before opendox.serve runs. 2 nodes. The child, in order:
    1. puts this checkout's src/ first and imports openXdox's governed columns from it;
    2. checks that openxdox resolves to this checkout;
    3. registers openXdox's governed projection (projection_contributions.register(), the call openxFactory's host makes, plan 034 T064);
    4. builds openxFactory's composite with sys.path saved and put back;
    5. runs T020's _refuse_an_openxdox_from_elsewhere, the very function (its source, run in the child);
    6. registers the composite.
  • R9-R2 (a): re-scoped to openDox with no host (python -m opendox.serve, a PyYAML blocker as its only path entry). The refresh is refused as unknown_action, and no yaml is loaded. 1 node.
  • R9-W3: test_serve_module_uses_no_relative_imports is RETIRED. 1 node.

Two notes for the holder (measured; no ruling taken):

  1. R9-R2: openDox's serve tries import yaml at START, not on a POST.
    • Measured: build_server(), then _probe_nlm, then real_notebook_adapter, then opendox.workbench:52, which imports PyYAML.
    • The blocker refuses it, and the probe reads that as no notebook support.
    • None of the three POSTs tries it. So the blocker counts every import attempt, and the test asserts that the count after the POSTs equals the count once the serve is up.
    • Mutant M11 (below) shows the count catches a POST that reaches for yaml.
  2. R9-W3's scope: the regex retires together with its self-test.
    • The pin was the scan, the pattern it scanned with (RELATIVE_IMPORT_RE), and that pattern's 7-case self-test (test_the_relative_import_guard_catches_every_dot_and_segment_depth). The file's own comment named the three as one pin.
    • All three are retired: 1 red node and 7 green.
    • Say if you want the self-test kept.

R9-R2's lone consequence: none.

  • Run alone lone, the re-scoped node does not run. The file still fails at COLLECTION on doc_health (openxdox.generator): ModuleNotFoundError: No module named 'doc_health', 1 error in 0.39s.
  • So tests/declared_exclusion.yaml is unchanged, and the entry keeps [doc_health].

Falsifier, quoted

The composed form (R1Q23 (a)):

  • openxFactory 92010d3e (tests/composed_host_pin.yaml), with openDox, openXdox and openXwallet recursive, and its scripts/ on PYTHONPATH;
  • openDox-code 84f8ed83, installed;
  • T022's runbook placement made before the run and removed after;
  • the colour variables unset, with TERM=dumb;
  • each file run ALONE: python -m pytest -q -p no:cacheprovider -rfE --junitxml=… <file>.

Measured over REAL main, after T095 (#46) landed:

  • base: main e2340bb6;
  • head: this PR's head ba0c3446, which is main e2340bb6 plus this PR's one file.
tests/test_repo_selector.py
base, main e2340bb6 18 passed, 24 failed
head ba0c3446 34 passed, 0 failed

The 24 at the base are DJ 17, DJ+VR 1, MN 2, W4 2, W3 1 and R9-R2 1. T095's 7 host-registration nodes are already green there. 42 nodes become 34: W3 retires 1 red and 7 green.

Unchanged set, composed, each file alone, at base and head: node-for-node identical, 974 nodes, 0 red at both.

  • 12.5's 16 governed suites: the same 16 at both.
  • F5.2's 5: test_generator 45, test_session_snapshot 23, test_snapshot_determinism 6, test_snapshot_registry 40, test_snapshot_validation_launch 9, all passed.
  • test_column_contributions_governed.py: 9 passed.
  • Over all 23 files: base 992 passed, 24 failed; head 1008 passed, 0 failed.

Lone (CI venv, openDox dede32b4 by the pin), at ba0c3446:

  • tests/test_declared_exclusion.py: 207 passed.
  • The R9-R2 node alone: 1 error, ModuleNotFoundError: No module named 'doc_health' at collection. Its entry stays as it is.
  • The CI form (python -m pytest -q --deselect "$LEFT_OUT"): 1161 passed, 4 skipped, 1 deselected. That is selected 1165, against the floors 1099 / 1095 / 4. The floors are untouched.

Mutants (one exact edit each, the file run composed alone)

Measured at the earlier integration of main f70bc9c3 + #46 c2192e3e. This PR's file is byte-identical at ba0c3446.

id mutation result
M1 display.js not copied KILLED, 18 red
M2 no package.json survived: equivalent on Node 24, whose syntax detection reads display.js as a module; kept for parity with T026's harnesses
M3 the harness ignores the display it is handed KILLED
M4 sparseNotice not given the display survived: equivalent at this pin, since the served words for the four empty stations are openDox's neutral ones (the ruled overlay changes only completion and the values). M3 guards the hand-off
M5 this checkout's src/ not put first KILLED, both W4 nodes. Locally, the editable install is another clone; in CI it is the checkout itself, so there this edit is equivalent
M6 openXdox's columns not imported from this checkout first KILLED, both W4 nodes, by T020's guard
M7 M6, with the guard call removed too survived: the control, showing that the guard is what kills M6
M8 the governed projection not registered KILLED, both W4 nodes
M9 sys.path not put back survived: no openxdox import after the composite is read reaches the pinned leg in these two tests. The in-process harness has the same posture
M10 the composite not registered KILLED, both W4 nodes
M11 R9-R2 on loopback, with the notebook asserts dropped, so a POST reaches yaml KILLED, by the attempt count

Files changed

  • tests/test_repo_selector.py (only).

Gates at ba0c3446

  • CI:
    • validate passed (run 37548690247): 1161 passed, 4 skipped, 1 deselected, and triple: selected=1165 passed=1161 skipped=4 failures=0 errors=0 against the floors 1099 / 1095 / 4.
    • SonarCloud Code Analysis passed.
  • Copilot: review 5435813621 at ba0c3446 reads "Findings: None". Its "Needs a closer look" note concerns the then-unlanded T095: the composed harness for the declared integration tests (plan 038, T094's R2-INV-R9) #46, which has since LANDED as e2340bb6 and is merged into this head. The earlier review, 5435251251 at 0c0f8bc8, also read "Findings: None".
  • Review threads: 0, so 0 unresolved.

What remains

🤖 Generated with Claude Code

Summary by Sourcery

Respell the repository-selector tests to validate the current openDox hosting boundaries and server behavior.

Enhancements:

  • Update repository-selector tests to exercise the current openDox/openXdox carve, including served display metadata, projection routes, and host registration from the active checkout.
  • Cover both plain-script and module server execution through behavioral HTTP checks, including host-provided refresh actions and openDox's dependency-free refusal paths.

Tests:

  • Bring the repository-selector test suite from 24 composed failures to green while preserving the unchanged test set.
  • Retire the outdated relative-import scanning tests and replace their coverage with subprocess behavior checks.

Brett Heap and others added 2 commits October 6, 2026 19:11
…n 038; T094's map R2-INV-R9)

One file, tests/test_repo_selector.py, under the holder's rulings on T094's
map (openxFactory#656 comment 6021830531):

- DJ, R9-W1 (A''): the three Node harnesses copy display.js beside the model,
  with package.json, as T026's harnesses do (17 nodes).
- VR, R9-R1 (a): the sparse-station node is handed the display /capabilities
  serves under the registered host, and asserts the served words (1 node).
- MN: SNAPSHOT_INDEX_ROUTE is read from openxdox.serve_projection (2 nodes).
- R9-W4: the plain-script and module subprocess tests register the host from
  THIS checkout before opendox.serve runs: openXdox's columns and governed
  projection from this checkout, openxFactory's composite read with sys.path
  saved and put back, and T020's guard, the very function (2 nodes).
- R9-R2 (a): the PyYAML claim is re-scoped to openDox with no host: refresh
  refused as unknown_action, and no POST tries to import yaml (1 node).
- R9-W3: the D12 relative-import pin is retired, with its pattern and that
  pattern's self-test (1 red node retired, 7 green with it).

Composed, the file alone, at a local integration of main d45a093 + #40
542a5c4 + #46 7ad77ae: 24 failed, 18 passed before; 34 passed after.

Lane: openXfactory-3

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openXfactory-3

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@brettheap
brettheap requested a balanced review from Copilot October 6, 2026 22:27
@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

This draft rewrites the repo-selector integration tests to match the openDox/openXdox carve: Node harnesses now consume served display capabilities, subprocess tests explicitly register the current checkout's host and test both serve entry points, and dependency isolation targets unhosted openDox while the obsolete relative-import scan is retired.

File-Level Changes

Change Details Files
Re-align the repo-selector tests with the openDox carve and host-registration contract.
  • Update the test scope and route ownership references from openXfactory serve to openDox serve.
  • Read the snapshot-index route from openXdox's projection module.
  • Retire the relative-import source scan and its regex self-tests per R9-W3.
tests/test_repo_selector.py
Extend Node model harnesses to exercise the served display capability.
  • Copy display.js and a module-type package manifest alongside the model in every harness.
  • Pass the served display into empty-station and sparse-notice derivation and assert served labels and display propagation.
  • Fetch display data from the server's /capabilities endpoint for sparse-station coverage.
tests/test_repo_selector.py
Replace subprocess serve coverage with checkout-local host registration and dual invocation modes.
  • Build a child-process bootstrap that prioritizes this checkout's src, imports governed columns, registers projections and the composite host, restores sys.path, and runs the existing provenance guard.
  • Exercise GET/POST behavior under both plain-script and python-module invocation through a shared process fixture.
  • Preserve subprocess diagnostics when serve startup or request handling fails.
tests/test_repo_selector.py
Rescope the dependency-isolation test to unhosted openDox behavior.
  • Launch python -m opendox.serve without a host using a PyYAML import blocker.
  • Assert refresh and unknown actions are refused while notebook access remains loopback-gated.
  • Count yaml import attempts before and after POSTs to detect lazy dependency loading.
tests/test_repo_selector.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Cross-repository behavior depends on pending PR #46 and composed integration pins requiring final human validation.

Review effort: Balanced
Findings: None

What changed in this PR

Rescopes repo-selector integration tests to the openDox/openXdox carve, dependent on PR #46’s composed host registration.

Changes:

  • Adds display-aware Node harness coverage.
  • Updates route ownership and subprocess host setup.
  • Replaces obsolete import scanning with behavioral serve tests.
File Description
tests/​test_repo_selector.py Updates repo-selector model and serve integration tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Brett Heap and others added 2 commits October 6, 2026 23:28
Lane: openXfactory-3

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openXfactory-3

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The composed cross-repository behavior depends on the unlanded PR #46 and requires final validation after that prerequisite merges.

Review effort: Balanced
Findings: None

@brettheap brettheap changed the title DRAFT: T100: the repo selector's declared tests, respelled to the carve (plan 038, T094's map R2-INV-R9) T100: the repo selector's declared tests, respelled to the carve (plan 038, T094's map R2-INV-R9) Oct 7, 2026
@brettheap
brettheap marked this pull request as ready for review October 7, 2026 00:25
@sourcery-ai

sourcery-ai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 17 hours and 39 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@brettheap
brettheap requested a balanced review from Copilot October 7, 2026 00:44
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The test updates match the governing T100 requirements with no unresolved correctness issues.

Review effort: Balanced
Findings: None

@brettheap

Copy link
Copy Markdown
Contributor Author

READY at 1c2693f

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Holder, automatic READY on Brett's word "land lane 3's PRs when green" (2026-10-06). At the head: CLEAN, rollup SUCCESS, nothing pending, 0 unresolved threads, and Copilot at 1c2693ff reads "🟢 Approval recommended". The per-repo lander checks closing keywords and lands it.

@brettheap
brettheap merged commit 2a3d8c0 into main Oct 7, 2026
4 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

LANDED — lane openxfactory-4, 2026-10-07T00:47:49Z, PR #54 → 2a3d8c0 (opensoft/openXdox-code main; plain gate)

Brett: plan 038 RULED incl. lane openxfactory-4 lands every PR (#656 6013547504); Start release 2 (#656 6001702967)

brettheap added a commit that referenced this pull request Oct 8, 2026
Brings T101 (#48), T098 (#51), T103 (#49), T096 (#53), T100 (#54), T099
(#47), T021's follow-on (#55), T102 (#52), T022 (#41, landed as aefd109),
T097 (#50) and T096's follow-on (#56).

Conflicted: scripts/composed_placements.py and tests/test_composed_placements.py,
both T022's files, which this branch carried from #41 through #44. Main's
landed side is kept for both. tests/declared_exclusion.yaml merged clean
(T101's entry edits beside T073's header and open_until).

Lane: openXfactory-3

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

2 participants