Skip to content

Add bounded gap/reuse preflight with live open-work discovery - #31

Draft
DeepWolf42 wants to merge 18 commits into
mainfrom
loop42/cross-domain-pattern-scout
Draft

DeepWolf42 wants to merge 18 commits into
mainfrom
loop42/cross-domain-pattern-scout

Conversation

@DeepWolf42

@DeepWolf42 DeepWolf42 commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Problem and resulting behavior

The existing opt-in Gap & Reuse preflight could inspect owned code, but open-work coverage required hand-prepared adapter evidence. This draft now lets the host collect live open PR/issue title leads in the same RECONCILE / TARGET call:

python -m tools.checks.gap_reuse_preflight --repo . --target "checkpoint recovery" --trigger dependency_decision --expected-head "$(git rev-parse HEAD)" --github-repository example/project

Current candidate: bfc3a3ef798dd13a81638446156d5d152c4380fe, extending previous head 6f0af2121659d1bc694c5bb981e2ef78cb63dfac. Current main a2935656a63a01e24ba56d3c424483d10d4282e7 is an ancestor; no merge to main was performed.

Implemented

  • Keep the existing bounded cross-domain scouting rules and reuse order: owned code → open work → installed capabilities → external patterns. Reuse the tracked-file/symbol repository map and existing evidence validation rather than introducing a second scanner or state store.
  • Add a standard-library GitHub adapter behind explicit --github-repository owner/name. One GET, at most 100 open PR/issue records and 512 KiB, 10-second socket timeout; no retries, pagination or redirects. Routine calls skip collection.
  • Bind observations to the local HEAD, recheck HEAD after collection, retain timestamp/source scope, reject conflicting live and supplied open-work evidence. The host explicitly selects the repository; origin identity is not inferred.
  • Treat results as untrusted title matches only. At most eight adapter leads enter the existing maximum-three candidate selection. Pagination, access/rate/transport failures, truncated HTTP, deeply nested/invalid JSON and invalid references yield BLOCKED_UNKNOWN, never an invented negative result. Local code scanning remains usable when GitHub coverage is unknown.
  • Use an already supplied GITHUB_TOKEN only for the explicitly selected request, with no credential acquisition or permission changes; no token/raw response/exception text in reports. Public repositories also work anonymously.
  • Update the existing EN/DE preflight documentation, Matrixloop link and checks index. No new dependency, workflow, database or persistent worker.

Verification

On exact local commit bfc3a3ef798dd13a81638446156d5d152c4380fe:

  • Full repository suite: 274 tests, OK, 5 Windows capability skips.
  • 23 focused preflight/adapter tests pass, including routine/stale-HEAD guards, HEAD movement during collection, errors/pagination/size limits, strict response validation and credential handling.
  • Both exact-revision completion gates PASS; git diff --check passes; checkout clean.
  • Real public read-only CLI exercise on this commit: open_work=USEFUL_CANDIDATE. A direct adapter probe also found existing PRs Adopt reuse-first capability lookup and state-bound executor patterns #39 and Add bounded tool, plugin and skill selection to Execution Fit #51 for “reuse tool”. This demonstrates retrieval, not verified reuse fit or private-repository access.
  • Independent delta review identified HTTPException/RecursionError gaps; both were reproduced with failing countercases and fixed. No other findings were reported.

Hosted evidence associated with this PR head (GitHub PR checkout, separate from local execution):

Remaining limits and authority

Keep Draft. There is still no automatic host/chat trigger dispatch, installed-tool inventory adapter, external pattern research adapter or consumer acceptance proof. A complete title-list negative is not proof no useful implementation exists; remote PR state can change after observation. Recommendations keep adoption_authorized=false.

No scheduler activation, automatic merge/adoption, release, paid service/model call, plugin installation, hardware action, CORA/dentalCOM change or consumer-pin update. Existing PRs #39/#51 were inspected live: their relevant changes are documentation/contracts, not an already implemented runtime adapter. No external code was imported.

Copy link
Copy Markdown
Owner Author

Added the bounded Perspective probe requested during CORA research.

It stays inside the existing External Pattern Scout rather than creating a new loop stage or agent role. The optional probe uses three lenses only when they can change the search/pre-mortem:

  • downstream: what becomes the next bottleneck if the current plan succeeds?
  • inversion: which central assumption could make the framing wrong / can a dependency be removed or reversed?
  • outside: how would an operator, maintainer, safety reviewer, or adjacent discipline frame the same problem?

Output is capped at one or two concrete alternate hypotheses/search directions; it must be skipped when it adds no distinct decision, evidence target, or failure hypothesis.

Regression coverage and the frozen scout scenario were extended. Loop42 CI + secret scan are green on head f1e86de39a6bb1b67b4f04184bf6291665aeb8fe.

The PR remains open and is currently one commit behind main; no force update or duplicate PR was created.

Copy link
Copy Markdown
Owner Author

Current-main reconciliation and independent CI — 2026-10-15

Current exact head: ce925d3cb2b58075b205b7ab2954ce2124112b0f (existing Draft; unmerged). Reconciled previous head f1e86de39a6bb1b67b4f04184bf6291665aeb8fe against main be1c63ecee37957bab0e819069abdf83653fd8a1 using an exact two-parent Git merge tree and fast-forward PR-branch move. No force push. Verified all four PR file blobs preserved exactly and no other main file changed. Current live compare: 7 commits ahead, 0 behind.

Exact PR-head verification: Loop42 CI 38689524360: SUCCESS, 133 Python tests OK, both opt-in completion gates PASS on synthetic PR checkout f8ec1a345c0d3d883dc071a71982d42ff5200405. Secret scan 38689524240: SUCCESS.

Boundary: Scope is documentation and simulated scouting scenario/tests, not external code adoption or independent product feature. It preserves source/revision/license/relevance checks and does not grant execution/merge authority. Existing Draft remains open; no protected main, CORA pin, Windows worker or Ollama changes.

@DeepWolf42 DeepWolf42 changed the title Broaden external scouting across problem domains Add bounded gap/reuse preflight with live open-work discovery Oct 28, 2026
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