refactor: package UI runtime and propose Python quality gates (incomplete checkpoint) - #110
Draft
Paulo Lacerda (placerda) wants to merge 11 commits into
Draft
refactor: package UI runtime and propose Python quality gates (incomplete checkpoint)#110Paulo Lacerda (placerda) wants to merge 11 commits into
Paulo Lacerda (placerda) wants to merge 11 commits into
Conversation
Preserve legacy exports, startup ordering, configuration state and staged assets; retain inherited handler violations for explicit review rather than approving new debt. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record contributor setup, staged wheel assets, protected-base controls, rollback and remaining evidence without claiming quality enforcement is active. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 6, 2026
Run the existing behavioral suite from a staged tests-only directory in the non-editable installation, without inherited system packages or source paths. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Close schema, signature/suppression, move/debt, adapter, dynamic-import and handler-evidence gaps with unittest mutation fixtures. Add protected execution receipts and aggregation plus an ephemeral offline Linux image acceptance job. Keep inherited handlers unapproved and runtime/installed-test ownership separate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…visions Add targeted fixtures for unrelated alias shadowing, package initializer ownership, next-PR coverage persistence, malformed mypy diagnostics and coordinated artifact forgery. Reject observed bypasses while retaining fail-closed policy behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add regression-first coverage for untyped qualified suppression decorators, schema-valid exception approval reuse after alias rebinding, lexical/class-member/unresolved catches and root namespace modules. Resolve bounded source bindings, refuse unresolved approvals, and use explicit mypy package bases. Leave runtime and parent-owned files unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Narrow SDK and parser failures, repair bounded App Configuration retries, execute retained UI failure boundaries, and prevent candidate imports inside protected static tools. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record 28 individually justified but unapproved exception sites, preserve protected adoption failure, and align contributor guidance with history ownership and isolated tooling. 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.
Resumed UI implementation for Azure/GPT-RAG#681
Draft targeting
develop, headee35c9ffea67902b4dc935e287beb5d4640ce6d6.Coordination: Azure/GPT-RAG#689. Canonical documentation: Azure/GPT-RAG#688.
This supersedes the frozen
871106dcheckpoint; it is implementation, not another audit-only handoff.The remaining code-feasible UI work is implemented. Quality-policy adoption is still blocked: 28 exact application-boundary proposals are not approved, and the protected base has no adopted policy. No approvals, settings, merges, release/tag/image publication, deployment or VERSION change were performed.
Delivered changes
653660e31daa2de8219bf38a571e8bd97f227a8a: bounded U1 history split.api.historyowns the ChainlitBaseDataLayercallbacks, fresh factory, registration, ambient session lookup/update and consume-once request metadata.services.history.HistoryServiceowns history/user operations, explicitHistoryOperationContext, orchestrator calls and the sole_userscache. Ownership precedes session selection and rename token resolution. Legacydatalayer.OrchestratorDataLayer/get_data_layerexports and value types remain compatible; no service-to-API edge, DTO hierarchy, storage rewrite or factory-semantic change.1ef7539d7a04e388afe850b09e53f5fb12be3a76: concrete dependency-failure contracts and Q6 isolation. Repair the actual unbound Tenacity retry callback; do not retry absent in-memory keys or hide unexpected nested providerRetryError. Addconfig.errors.ConfigurationError. Narrow HTTP/JSON, Blob, JWT, VERSION and optional logging catches while retaining documented failures and surfacing programming defects. Resolve all 20 previously reported runtime Ruff findings.-I; Grimp/Import Linter use an isolated explicit source-directory graph without importing candidate application code. A Windows subprocess-environment regression also preserves explicit empty values after environment-restoring tests.ee35c9ffea67902b4dc935e287beb5d4640ce6d6: individual proposed-boundary records, exact refreshed observational inventory and reconciled contributor documentation. Broad sites decrease from 63 to 28. Every proposal includes the exact fingerprint/caught types, boundary-specific reason, outcome, diagnostic path, failure-test selector, review stage and expiry2026-10-06. All remainproposed; none is an active waiver.Actual evidence
CI: https://github.com/Azure/gpt-rag-ui/actions/runs/34050677391
GitHub evaluated merge commit
d76bfc1b3ae878d63dd737b97e3f23301024cbcf, whose parents are protected basec635bc6696714b543feec24b4a062a8a8f3ff6d0and PR headee35c9ffea67902b4dc935e287beb5d4640ce6d6. Its treec14d673a8be755c9bba6dd8d9952c7aa991ebd98is identical to the PR head.ee35c9f; same-source gate exit 1: lint/type/architecture passed with zero findings, 28 unapproved-handler findings and 1 bootstrap-review findingThe CI receipt records all 521 methods as passed with unchanged source. All 28 proposed sites match current source and all referenced failure tests passed in that receipt. Those facts do not approve any record.
The first local full attempt timed out during clean runtime-dependency installation. Its failed log/receipt were preserved; the unchanged retry passed without increasing timeouts or changing dependencies. The final local receipt and quality report share run ID
114b8ef9-a191-4d03-bb42-bb9781da229f, headee35c9ffea67902b4dc935e287beb5d4640ce6d6and unchanged source.Typing is deliberately staged: 52 blocking identities of 80 discovered modules; the three original seeds are canonical
config.chat_backend,config.panel_config,config.hosted_continuity_config, plus new modules/adapters. The other 28 moved identities remain explicitly uncovered; the CI report retains 108 nonblocking imported diagnostics.typing-baseline.jsonis empty. This is not a claim of full-repository type cleanliness.Regression and task mapping
.qualityschemas; pinned development tools; protected lint/type policy, workflow and CODEOWNERS; real-tool/protected-fixture/aggregate cases intest_quality_policy.pytest_real_mypy_qualified_suppression_disables_untyped_body_checking,test_exception_alias_rebinding_invalidates_existing_approval,test_root_namespace_sources_cannot_disappear_as_external_imports, plus lexical/qualified/class-member controlstest_history_boundary.pyadds 12 focused cases for API/service ownership, task-local consume-once metadata, shared users, ordered session updates, denial, explicit citations and propagated backend/framework defectstest_failure_contracts.pymethods; 7test_boundary_failures.pymethods; 8 added socket failure methods; existing download/panel/continuity/security suites. Exact per-handler selectors live in.quality/exceptions.jsontests/container_smoke.py; Ubuntu ephemeral build, read-only mounted tests,--network none; no image pushAGENTS.md,docs/python-development.md, Unreleased changelog and this immutable evidence handoff; parent owns canonical docs/umbrella reconciliation and human acceptanceReproducible commands
Use Python 3.12 (local 3.12.9). Runtime requirements and Chainlit 2.9.4 remain unchanged. Development pins: Ruff 0.16.5, mypy 2.3.1, Import Linter 2.14, Grimp 3.16; setuptools 80.9.0 for packaging.
Same-source PowerShell receipt and gate, with no intervening source edits:
--check:all|lint|typing|architecture|exceptions|policy. Exit 0 = passed, 1 = violations, 2 = invalid/incomplete execution. Runner also supports--patternfor targeted work; the aggregate requires completetest_*.pydiscovery.Non-editable code installation and unchanged operator startup:
For a wheel, build with
python -m pip wheel --no-deps --wheel-dir .artifacts\wheel ., install that wheel into the target runtime environment after the unchanged runtime requirements, and start from the staged application root. The installed artifact is code plus externally staged.chainlit,public,chainlit.config.yaml,chainlit.md,VERSION; use existingCHAINLIT_APP_ROOTor that cwd. Uploads/config/assets stay in the writable application root, never site-packages. Docker retains/appanduvicorn main:app; no runtime dependency-list duplication orsys.path/sys.modulescompatibility workaround.Remaining acceptance and recovery
No further identified UI implementation repair remains in this scoped phase. Review/acceptance is not represented as completed: maintainers must decide each of the 28 proposed boundaries and adopt protected policy through PRs; administrators must activate required-check/code-owner enforcement and collect controlled positive/negative PR eligibility evidence. Live orchestrator v4.1.1 / ingestion v2.7.3 integration and production recovery acceptance are not substituted by these offline suites. These are genuine review/admin/live acceptance activities, not fabricated approvals.
The feature branch remains independent, draft and unmerged. Generated build/venv/wheel/egg-info/receipt artifacts are ignored; tracked status is clean. Restore the previous UI artifact built from
c635bc6696714b543feec24b4a062a8a8f3ff6d0(researched v2.6.2-equivalent runtime) through the existing release process if recovery is needed; no data, configuration-key, RBAC or backend contract migration is introduced. Do not disable the gate to bypass its adoption failure.