fix(control-center): restore GET /report/data to public - #78
Merged
Merged
Conversation
Reverses part of commit 8705cbf (control.omnibioai.org direct-tunnel route audit), which gated GET /report/data behind platform.manage_infra. Last night's follow-up (5fe7c6a, 2026-09-02) restored /report/status and /llms after confirming those were accidental over-gates, but deliberately left /report/data gated because its projects[]/languages[]/coverage[]/gitStatus[] arrays name every repo and expose live dev state. Tonight's investigation found that decision broke ControlApp's public Ecosystem Report page entirely: PublicEcosystemPage.tsx's four tabs (Projects, Languages, Code Coverage, Ecosystem Status) all render from a single GET /report/data call, which now 401s for the anonymous visitors that page is built for -- every tab silently showed "No report data yet" instead of a permission error. This is a deliberate reversal, not a correction of an oversight: we are consciously accepting that gitStatus[] (branch names, modified/untracked/unpushed commit counts across every repo) becomes publicly visible, in exchange for restoring the full dashboard. /report/public-stats (the narrow, repo-name-free aggregate endpoint added alongside last night's fix) is left in place unchanged, still useful as the minimal-surface option. - main.py: drop require_permission("platform.manage_infra") from report_data(); update its docstring plus the adjacent /report/status and /report/public-stats comments, which asserted /report/data would stay admin-only. - /report/data is its own @app.get, not on a shared router (unlike /report/status and /llms last night) -- no router-level gate to worry about splitting. - test_main.py: TestReportData now asserts 200 (not 401) with no token; removed /report/data from TestPlatformManageInfraAuth's still-gated case list and TestOverGateRegressionGuard.STILL_GATED, same pattern used for /report/status and /llms. - test_public_dashboard_no_leak.py untouched -- /report/public-stats's forbidden-key sweep still applies to that endpoint only. Full suite: 1717 passed, 98.47% coverage. Manually verified against the real generated report_data.json (no auth header): 200 with 32 projects / 25 languages / 32 coverage rows / 33 gitStatus rows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VevfQdYwX27LkcGqfRAxQL
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
Reverses part of commit 8705cbf (control.omnibioai.org direct-tunnel route audit): restores
GET /report/datato fully public, no auth required.Last night's follow-up (5fe7c6a, 2026-09-02) restored
/report/statusand/llmsafter confirming 8705cbf over-gated them, but deliberately left/report/datagated — itsprojects[]/languages[]/coverage[]/gitStatus[]arrays name every repo and expose live dev state, so/report/public-stats(a narrow, aggregate-only, repo-name-free endpoint) was built alongside that fix as the intended public replacement.Tonight's investigation into
control.omnibioai.org's "Projects" tab showing "No report data yet" (after yesterday's separate Cloudflare tunnel routing fix) found that/report/public-statswas never actually wired into the frontend —PublicEcosystemPage.tsx's four tabs (Projects, Languages, Code Coverage, Ecosystem Status) all share a singleGET /report/datacall, which has 401'd for anonymous visitors since 8705cbf. Every tab was silently broken.This is a deliberate reversal, not a bug fix for an oversight
We are consciously accepting that
gitStatus[](branch names, modified/untracked/unpushed commit counts across every repo) becomes publicly visible, in exchange for restoring the full public Ecosystem Report dashboard. This was an explicit, confirmed decision this time — unlike 8705cbf's original over-gate, which was accidental./report/public-statsis left in place unchanged — still the minimal, repo-name-free option for anyone who only wants aggregate totals.Changes
main.py: dropDepends(require_permission("platform.manage_infra"))fromreport_data(); update its docstring and the adjacent/report/status+/report/public-statssection comments, which asserted/report/datawould stay admin-only./report/datais its own@app.get, not on a shared router (unlike/report/status//llms, which were both bare@app.gettoo) — no router-level gate to split.test_main.py:TestReportDatanow asserts 200 (not 401) with no token, plus atest_200_with_token_toofor parity withTestLlmsPublicAccess./report/datafromTestPlatformManageInfraAuth's still-gated case list andTestOverGateRegressionGuard.STILL_GATED— same pattern as/report/status//llmslast night.test_public_dashboard_no_leak.pyuntouched —/report/public-stats's forbidden-key sweep still applies to that endpoint only.Testing
main.pyat 100%.TestReportData,TestPlatformManageInfraAuth,TestOverGateRegressionGuard,TestReportStatus,TestLlmsPublicAccess: all pass.test_public_dashboard_no_leak.py: 11/11 pass, unmodified.report_data.json(noAuthorizationheader):200withprojects(32),languages(25),coverage(32),gitStatus(33) all populated. The currently-running container still 401s until this merges and redeploys — expected, not a discrepancy.Not merging — opening for review per the explicit ask.
🤖 Generated with Claude Code