Audit hardening: authorization, run recovery, and accessible review UI - #12
Open
FlowerYes wants to merge 4 commits into
Open
Audit hardening: authorization, run recovery, and accessible review UI#12FlowerYes wants to merge 4 commits into
FlowerYes wants to merge 4 commits into
Conversation
FlowerYes
requested review from
Yasser-Ameur and
Yasser-Ameur-Dev
and removed request for
Yasser-Ameur
September 10, 2026 15:01
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.
Summary
This PR packages the September 8 audit into four reviewable commits. It fixes reproducible defects in authorization/replay, task approval and synthesis recovery, specialist prompt context, and browser review state. It also includes the regression tests, rendered UI evidence, and a source-reconciled evaluation guide.
Local result: 1,329 tests passed, 1 live-provider test skipped; 46 new regression cases. This does not claim a completed live-provider deployment, production certification, or a win against competing products.
Baseline:
4606ccfonmain(v0.4.0). No dependency upgrades or database migrations are included. The pre-existing localAGENTS.mdchange is deliberately excluded.Suggested review order
b7abffeservices/organizations.py,services/rooms.py,realtime/websocket.py,realtime/fanout.py; three regression files8734667db/repositories.py,services/{agent_tasks,steps,branches,runs,_shared}.py,nexus_bridge/agent_bridge.py; three regression filesaabb4efweb/index.html,web/app.css, browser modules,tests/e2e/test_operation_context.py1dc845bREADME.md,docs/{BACKLOG,EVALUATION}.md, dated audit report and screenshotsThe PR contains 60 changed files, including 24 screenshots and seven new regression-test files. Start with the behavioral commits; the images document desktop/mobile and both themes, not additional application code.
Full audit, architecture/provider trace, current competitor sources, and remaining roadmap
1. Authorization and realtime correctness
Problems
OverflowErrorafter repeated failures.Changes
Fresh review found two regressions in an earlier version of these repairs—presence failure interrupting multiroom cleanup, and a failed authorization read leaving a silent socket subscribed. Both now have failure-injection tests and were repaired before this PR.
Reviewer hotspot: examine commit-versus-delivery boundaries and multiroom cleanup. Do not replace the durable checks with an unchecked cache to recover throughput.
2. Task, synthesis, and provider lifecycle
Task/approval settlement
An A2A task previously became failed when its execution paused for human approval without returning an output. A later approval could finish the execution while the task remained failed.
Task state now follows the matching current execution through authorization-required, working, completion, rejection, expiry, and cancellation. Task state, answer, and canonical events settle in the same transaction as the run. Cancellation refuses late output; recovery preserves an already completed answer. An older execution cannot settle a newer task attempt.
Synthesis recovery
Synthesis previously persisted RUNNING/idempotency before awaiting the model but could remain RUNNING indefinitely after cancellation or a crash. The start event was delayed until termination.
created_atestablishes a fixed, nonconfigurable five-minute deadline. Provider waiting is bounded, and publication checks both status and deadline inside its transaction.Specialist context
The direct
model-providerharness omitted specialist identity/instructions. It now uses the same specialist prompt assembly as the default bridge, without duplication. A paired-harness regression compares outgoing prompts, frozen branch context, and exact persisted provider-input provenance.Reviewer hotspots: atomic event creation, cancellation during failure handling, stale-worker publication, matching execution ownership, and the five-minute deadline's suitability for existing deployments.
3. Browser behavior and UI
The existing visual identity and navigation model are preserved. This is a targeted usability/correctness repair, not a wholesale redesign.
Representative UI evidence — click to expand
Desktop review, light
Mobile publication, dark
Additional evidence: desktop dark, 320px menu, 320px dark review.
All specialist content shown is explicitly simulated. These images are not evidence of reasoning quality.
Verification and reproducibility
Local environment: Python 3.12 on macOS, pinned
constraints.txt, Chromium. Real local HTTP/WebSocket/browser checks ran outside the restricted socket sandbox. Production code was unchanged when packaging the verified tree into commits.pip checkpip-audit -r constraints.txtThe performance test now asserts p95 below 250 ms instead of merely printing it. The macOS body-cap regression measures lifetime peak RSS through a test-only child probe; it still requires rejection of a 64 MiB chunked body with HTTP 413, under 15 seconds and under 32 MiB peak growth. Windows native measurement is preserved.
The one skipped test requires
OPENAI_API_KEY. There are 28 existing transport/cookie deprecation warnings, not suppressed. No external NEXUS runtime, real model endpoint, container build, or alternate supported Python interpreter was validated in this local audit. CI status should be reviewed independently before merging.Compatibility, operational risks, and rollback
Explicitly out of scope / remaining product gaps
The audit report compares current primary-source evidence for QM, Buzz, Grok Bot, Hermes, Commonly, Patchwork, and Agor, but does not claim a hands-on competitive win. Remaining work includes independent skill grants, full provider-call accounting, original-source evidence beyond model text, operator-light email onboarding, artifact authoring/version comparison, and a live three-to-five-human benchmark. Existing workspace-directory and manual-decision UI are acknowledged rather than incorrectly listed as absent.
Reviewer checklist