[Draft] Bootstrap Python quality gates and remove the OBO import cycle - #346
Draft
Paulo Lacerda (placerda) wants to merge 17 commits into
Draft
[Draft] Bootstrap Python quality gates and remove the OBO import cycle#346Paulo Lacerda (placerda) wants to merge 17 commits into
Paulo Lacerda (placerda) wants to merge 17 commits into
Conversation
Extract the scope-aware OBO helper without changing identity contracts. Add source-only quality policy, mutation fixtures, incremental typing and fail-closed PR aggregation. Keep legacy handler approval and required-check activation explicitly incomplete. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 6, 2026
Validate exact policy shapes, source exports, dynamic import evidence and alias ambiguity. Record five non-authorizing audit exception proposals with their existing failure evidence. Repair the stale retrieval connector import and await its async embeddings without changing its security filter or error envelope. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add negative fixtures for audit configuration and custom container failures. Bind five additional audit-only proposals to exact source and passing evidence; all ten records remain proposed with no active approvals. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Name a second verified repository administrator in the proposed CODEOWNERS policy. Repository required-review settings remain an explicit administrator activation step. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject private class members and literal reflective member access while resolving qualified child attributes without inventing facade back edges. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep new-module typing coverage across PR bases, bind typing suppressions to source, guard implicit built-in alias ambiguity, and preserve package-private ownership. Validate pinned mypy diagnostics and independently bind closed aggregate reports to the protected policy and CI run. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Propose the existing typed-error-then-reraise contract without granting approval. Cover partial output, event ordering, exception identity and cancellation. Resolve JUnit class selectors against real test modules and reject duplicate or unknown evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Exercise provider-to-startup/strategy configuration outcomes, real MafLite-to-turn-to-SSE failures and cancellation, and distinct retrieval fallback/error contracts. Record synthetic raw-detail exposure as unapproved behavior, not safety acceptance. Remove only the unnecessary getenv string-formatting broad catch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run tools with isolated no-site startup in source-only snapshots, reject executable configuration, and install protected runtime dependencies in static CI jobs. Add adversarial source shadow, hook, plugin, cache and real-diagnostic regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record complete source-backed ownership and public boundaries while retaining immutable typing adoption identities across successive moves. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate parent-owned strategy propagation, bounded SSE diagnostics and enclosing span correction, with exact inactive boundary proposals and real-chain evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve malformed-input and optional-setting outcomes while propagating unexpected parser and retry-hook failures. Exercise real provider retry exhaustion, OBO error shapes, token expiry and logger restoration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Narrow optional imports and SQL dependency handlers, retain nested provider retries, consolidate redundant sanitizer recovery, and bound provider diagnostics. Add exact inactive compatibility proposals and public failure/cleanup evidence; do not grant approvals. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep hosted terminal framing and MCP cleanup exception priority while removing raw exception diagnostics. Add exact inactive boundary proposals and regression evidence; no handler approvals. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve Cosmos SDK unavailable results and partitioned HTTP contracts while surfacing unexpected failures. Use explicit optional configuration reads and Azure token errors. Bind four unapproved HTTP boundary proposals to real SDK-to-route evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Narrow diagnostic parsing and PyJWT catches, preserve fail-closed HTTP translation with bounded diagnostics, and add real signed-token and rotation evidence. The exact retained boundary is proposed, never approved. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve existing profile helper recovery and cancellation while bounding diagnostic content and distinguishing unconfirmed writes from saved profiles. Six exact helper proposals remain inactive; primary terminal outcomes and identity policy are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Status
Incomplete adoption / draft. Do not merge or activate required checks.
Implements the orchestrator scope of Azure/GPT-RAG#681. Coordination:
Azure/GPT-RAG#689. Published documentation is coordinated through the draft
docs-branch PR Azure/GPT-RAG#688, not published by this feature PR.
Current head: 2be1223.
Branch:
feature/python-module-boundaries; target: develop.The earlier freeze was lifted. This is an active implementation checkpoint,
not a claim that the remaining broad-handler adoption is complete.
Delivered changes
2.14, Grimp 3.16; tested with Python 3.12.9. Existing Hatchling,
srclayout, pytest, runtime dependency source and frontend jobs remain.and type-only imports, facades, cross-package private members and exact
dynamic-import sites. No runtime source import during analysis or cycle
baseline. Import Linter/Grimp independently cross-check package coverage.
modules across successive PRs and moves, individual diagnostic/source debt
identities, annotation/suppression ratchet, empty baseline. Imported
diagnostics outside declared blocking scope remain visible/nonblocking.
including Ruff-exempt logging/rethrow, exact exception fingerprints and
executed named JUnit evidence. Candidate policies cannot approve themselves.
quality-gatedepends on actual Python/frontend and all fivequality jobs. Protected evaluator, immutable Actions, read-only permissions,
verified CODEOWNERS, independent policy/repository/base/head/toolchain/run
identity validation and stale/skipped/malformed artifact rejection.
python -I -S, trusted venv wheel bootstrap without site initialization,sanitized environment/private snapshot cwd, no candidate plugin/custom
interpreter/config extension, fresh caches and an execution audit hook.
Real shadow-module, startup-hook, PYTHONPATH and plugin/cache fixtures.
This is not an OS sandbox or protection against compromised trusted wheels.
61b26e4. Source-backed exports, ownership,
importers, private relationships, aliases, immutable provenance and repeated
move checks. Storage refinement reported to parent: current records live in
protected
.quality/module-surfaces.json;policy.modulesremains theimmutable adoption-name inventory so typing coverage cannot disappear.
connectors.obo, preservingSearch compatibility callables, request scope, identity and token cache
behavior. Legacy retrieval plugin now uses existing
get_genai_clientandawaits embeddings, retaining typed error-result translation.
Runtime failure milestones
Parent-delivered and separately committed MAF correction:
f06d0cd.
MafLite and MAF Agent Service no longer convert outer failures into raw
ordinary answer text. Failures propagate through the existing typed turn/SSE
channel, with failed audit outcome and a constant-safe enclosing span/log.
The real chain covers early/partial output, initialization failure, success,
cancellation, history/finally persistence and an in-memory SDK exporter.
Exactly one generic SSE error is emitted; cancellation remains distinct.
This bounded correction does not certify every third-party span or other
strategy/legacy diagnostic as safe.
Earlier 5883d0a parser/retry milestone:
JWT base64/UTF8/JSON, blob URL, OBO JSON/expiry/fingerprint catches now use
actual parsing exceptions instead of arbitrary
Exception. Existing malformedinput/error envelopes and zero-TTL behavior remain. Unexpected parser failures
propagate. Removed unnecessary environment-host and saved logger-level catches.
Real provider evidence exposed Tenacity's incorrectly bound retry callback;
the static one-argument callback now executes the configured retry budget,
and lookup recovery catches exhausted
RetryError. Optional defaults/allow-noneand required-value errors remain. Five attempts/backoff configuration is unchanged.
Real AppConfig provider-to-startup/required-strategy evidence distinguishes
missing endpoint, authentication failure, unavailable provider and loaded
configuration with environment overrides on/off. Retrieval evidence separately
covers keyword fallback, empty provider context, tolerant composite siblings
and strict versus anonymous explicit
search_failedconnector outcomes.These outcomes are not homogenized into fatal errors or mislabelled as audit.
The f3cf4d6 failure-boundary milestone:
optional SDK converter absence catches only
ImportError, while unexpectedinitialization failures propagate. Nested provider
RetryErrornow remainsinside the actual retry budget instead of becoming a premature missing value.
Four exact inactive proposals cover the demonstrated AppConfig availability,
Search keyword/empty-context and strict/anonymous connector contracts. Those
logs retain classification/severity but no raw exception text/traceback.
Two redundant inner audit sanitizer catches and their obsolete proposals are
removed: the enclosing boundary still omits unreadable/partial containers and
releases cycle-detection state. Four SQL/Fabric catches now use actual
ODBC/Azure exception families; identical caller failures, token scopes and
credential cleanup remain, with bounded connector diagnostics.
No active approval or lint-avoidance logging exemption was added.
The 7565839 milestone closes the already-known hosted transport and MCP cleanup
boundaries: generic hosted errors remain deduplicated, partial output is
preserved without success closing frames, initialization failure is translated,
and cancellation propagates distinctly. MCP cleanup preserves the primary
failure/cancellation, including cleanup cancellation; without a primary failure
the identical cleanup error propagates. Two raw exception logs are now bounded
constant diagnostics. Three exact inactive proposals bind these contracts.
This deliberately adds two Ruff findings formerly exempted by traceback logging;
it does not hide either handler or claim broader telemetry confidentiality.
Parent owns the disjoint
src/util/blob_sas.pyand newtests/test_blob_sas_failure_boundaries.pyslice until handback; it is notincluded in this head.
The acaefa4 milestone removes 11 broad handlers: six Cosmos SDK boundaries,
two Search token boundaries and three optional telemetry configuration catches.
Cosmos preserves Azure SDK not-found/forbidden/transport unavailable results,
principal partitions, document mutations and soft deletes. Unexpected programming
failures now propagate instead of being called missing documents. Actual HTTP
evidence proves SDK read failures retain legacy404, unexpected failures use500,
foreign-principal documents remain403, and cancellation propagates. Rename/delete
success bodies and SDK/unexpected mutation500 remain. The existing SDK
unavailable/404 mapping is preserved, not certified as a new availability policy.
Four exact inactive HTTP proposals and bounded route/connector logs accompany
the narrowing. HTTP500 cannot prove a remote mutation was rolled back.
Telemetry now uses
get_value(..., allow_none=True)rather than masking failures:missing/unavailable/default/environment precedence remains; callback defects
surface. The HTTP log-level setting is read once, not four times inside a logger
loop. Search token failures propagate unchanged without issuing an HTTP request.
Two legacy not-found fixtures now raise actual
CosmosResourceNotFoundErrorinstead of generic
Exception. No blanket exception tuple or active approval.Current 2be1223 narrows JWT diagnostic parsing to
ValueErrorand issuerverification to
PyJWTError; unexpected verification/provider failures retainthe existing fail-closed generic401, now with a bounded exception-class log.
One exact inactive proposal binds that HTTP boundary. Real, in-memory generated
RSA keys and signed JWTs prove v1/v2 issuer handling, expiry/audience/tenant/
signature/algorithm rejection, trusted role shape, rotation/alternate JWKS,
required-setting500, cancellation and tenant-scoped cache clearing. No signing
keys are committed; no identity/audience/cache policy changes are introduced.
Existing debug claim diagnostics are not globally certified by this change.
Exact current evidence
Install commands are contributor setup, not claims of new installs in the
current batch. Runtime/tool pins were not changed in these follow-ups.
Individual checker selections:
lint,typing,architecture,exceptions,policy. Exit1 is violations; exit2 is incomplete/invalid analysis.-I -Sis required for static checker/aggregate startup; ordinary-Istillexecutes installed
.pth/sitecustomizehooks.npm run build.artifacts\boundary-pytest.xml.artifacts\pytest.xmlThe initial parser reproduction had three genuine unexpected-error swallow
failures and one incorrect nesting-depth fixture assumption. Correcting that
fixture and asserting actual provider call counts exposed two real callback
failures: 5 failed /44 passed before remediation. A first expanded selector
attempt used nonexistent auth test filenames and exited4 without running tests;
the corrected existing-file selection above passed. No failed command is
represented as a passing result.
Current batch regression receipts: optional-import/nested-retry selection
initially 3 failed /20 passed; bounded provider diagnostics 6 failed /23
passed; SQL/Fabric raw diagnostics 10 failed /5 passed. Each was repaired.
The new audit characterization initially assumed an object instead of the
existing JSON-string attribute; correcting the assertion gave 46 passed
before and after catch consolidation. The first consolidated suite exposed
the old hard-coded ten-site audit inventory assertion (1 failed /1082
passed); it now matches the eight remaining exact sites and still forbids
self-approval. The final consolidated receipt is the1102-pass result above.
Immutable MAF CI:
https://github.com/Azure/gpt-rag-orchestrator/actions/runs/34050328693
Current head CI is separate; prior-head results are not its execution receipt.
Exact current-head Linux receipt:
https://github.com/Azure/gpt-rag-orchestrator/actions/runs/34062040196
The parent-owned blob-signing slice remains outstanding and is not included.
Current batch commands include the full contributor suite/checker above and:
The SDK/configuration selection passed147 cases before adding eight real HTTP
mutation cases. Regression receipts were Cosmos32failed/12passed, Search4/2,
telemetry6/6 and API7/16 after correcting a new fixture's keyword signature.
The mutation success assertion was corrected for Pydantic's existing UTC
Zserialization, not a runtime change. Initial full suite1215passed/2failed caught
the legacy generic not-found fixtures; both corrected selectors passed and the
final integrated result is1217passed above.
The independent703 isolation review reported no significant new issues; no
repeat isolation implementation or pin changes are included in this batch.
The JUnit selector correction at93e4d5c adds no CLI flag: use
--junitxmland
--test-results. Class-based selectors resolve against actual test modules;duplicates/unknown modules fail, skipped/failed cases earn no credit. JUnit is
evidence, not approval or a cryptographic execution receipt.
Task accounting
Remaining acceptance and recovery
Substantive code/review work remains, not just a GitHub settings switch:
81 BLE001 findings, per-site disposition/evidence for99 unproposed handlers,
independent review of23 exact proposals, and unresolved legacy primary
fallback/raw diagnostic behavior outside the corrected MAF boundary.
There are no active exceptions or cycle/debt baselines. Do not invent approvals,
use broad exception tuples to green lint, or infer approval from characterization.
The seven original tooling findings are independently closed; the subsequent
703 isolation review found no significant new issues. ModuleSurface and
bootstrap/policy adoption approval remain separate.
The23 proposals comprise eight audit, three classic stream, three hosted/MCP,
four conversation HTTP, four configuration/retrieval and one JWT boundary.
They are neither active exceptions nor permission for other sites.
Cosmos's narrower SDK unavailable results are preserved, not an approval of
legacy persistence availability semantics. Auth configuration fallback,
OBO acquisition recovery, legacy strategy terminal
handling, optional startup/provider cleanup and typed plugin translations
still require their own source/consumer disposition. This is remaining
implementation/review work, not merely human administration.
Concrete unresolved runtime decision sent to parent:
NL2SQLStrategy.initiate_agent_flowandMultimodalStrategy.initiate_agent_flowstill turn thrown failures into rawordinary answer/history and successful completion. Their source is untouched.
Multimodal buffers before yielding; NL2SQL explicit typed validation/execution
error answers are distinct from thrown failures. The parent MAF correction did
not itself authorize changing these two public outcomes. The two-path
blob-signing delegation also remains outstanding. These are not approvals or
claims that every other unproposed site is human-only work.
Bootstrap deliberately reports its missing trusted base policy. An independent
administrator must review bootstrap/policy, require actual
quality-gateandtests on develop/main, require latest-head code-owner review, dismiss stale
approvals and restrict bypasses. No settings were changed. A separately reviewed
policy repair, not candidate self-approval, is required for policy changes.
Compatibility remains with shipped UI v2.6.2 and ingestion v2.7.3;
no dependency on companion unmerged runtime PRs, schema migration, configuration
rename, identity/cache redesign or orchestrator reorganization is introduced.
The MAF failure outcome intentionally corrects the legacy raw-answer path using
the already-existing generic SSE error contract.
Recovery is the preceding orchestrator artifact v4.1.1, without peer/data
migration. Artifact rollback does not undo later data, configuration or settings
changes. Live Azure compatibility/recovery and administrative clean/failing-PR
merge-eligibility acceptance remain unperformed. No merge, settings change,
release/tag/image publication or deployment occurred.