Skip to content

fix(public): establish a safe a0p release boundary - #109

Merged
erinepshovel-code merged 10 commits into
mainfrom
fix/public-readiness
Sep 19, 2026
Merged

erinepshovel-code merged 10 commits into
mainfrom
fix/public-readiness

Conversation

@erinepshovel-code

@erinepshovel-code erinepshovel-code commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Public-release candidate for a0p. The current repair head is 35ee3b19d838b7e4ebd23380ec74a6e5933993f6; merge and public deployment remain separate decisions.

Live review repairs

The audit reproduced all 16 open P1/P2 findings at 4b04abfad44df2a6f982559b57f1732ae8e78ccc and repaired their owning code paths:

  • Resolve saved orchestration preferences and provider identities before authorization; count actual one-round synthesis calls across the complete Fleet plan.
  • Bind/reset caller tier for both approval replays, CLI, and Fleet; pin guest and single-model Fleet to the provider that passed the gate.
  • Replace suffix-only WS promotion with operator-selected immutable WS_USER_IDS. Remove unverified-email authority from admin guards as the same privilege-escalation boundary. Stored historical tiers still require operator review before launch.
  • Meter every CLI attempt by client IP before FastAPI bearer authentication, including sessionless requests. Match once-decoded ASGI paths; derive client IP from the declared Cloud Run ingress suffix while ignoring caller-supplied prefixes. Bearer credentials never enter Express limiter storage.
  • Atomically settle guest reservations to actual usage or release backend failures; serialize guest-window creation so concurrent requests use one balance; bound expired rate-probe deletion.
  • Restore attachment-only message validation, Google Fonts CSP origins, and admin discovery of system tools.
  • Supply ADMIN_PASSWORD through Secret Manager, seed both admin role and tier, and fail closed on an existing unverified account claiming the bootstrap email.

The current CodeQL alert was localized from its check-run annotation to missing workflow token permissions in .github/workflows/deploy.yml, not the already-resolved Helmet CSP finding. The repair sets workflow-default contents: read. The final exact-head CodeQL check is successful with zero annotations, and every language/actions analysis completed successfully. No alerts were waived or dismissed.

PUBLIC_RELEASE.md maps every finding to its repair and regression witness. Changes are limited to existing authorization/routing/rate/storage/bootstrap code, deployment configuration, regression tests, and usage/release documentation. No runtime data, credentials, cloud resources, or Git history were altered.

Verification at repair head

  • Focused public-boundary Python suite: 32 passed; faked providers/storage, no paid model calls.
  • TypeScript check: passed.
  • Production build: passed using env -u REPL_ID NODE_ENV=production node --import tsx script/build.ts (the workspace blocks the tsx CLI IPC socket).
  • Provider contracts: passed (34 adapter tests plus two declared contract checks).
  • Production dependency audit: 0 vulnerabilities.
  • Request/configuration unit checks: passed.
  • Local full Python suite: 298 passed, 3 skipped, 4 PostgreSQL-environment failures. The same four database-dependent tests fail at the starting head; CI owns their database-backed witness.
  • Exact-head build/test/container workflow: passed. PostgreSQL-backed full suite: 302 passed, 3 skipped. Distributed limits, guest-window concurrency, settlement/failure refunds, admin bootstrap, and console guard passed.
  • Exact-head clean-build workflow: passed.
  • Provider job: 134 passed, plus 34 passed in its repair-contract subprocess and 2 declared checks passed.
  • Exact-head CodeQL: success, 0 annotations; all Python, Java/Kotlin, JavaScript/TypeScript, and Actions analyses completed.
  • The new focused Python regressions against the original head produced 22 failures / 10 passes; the repaired head passes all 32.
  • GitHub mergeability: clean, base 9a58c3fc9526735fdf9a596f19810c5198565ddc.
  • Independent current-head P1/P2 re-review: outstanding. The original review threads remain available for reviewer confirmation; source repairs and regression witnesses do not impersonate a reviewer approval. A new informational unnecessary-lambda suggestion is outside the launch-blocker repair scope.

Merge decision

Ready for re-review; not yet cleared to merge. Code, build, database, and CodeQL gates pass, but the previously requested exact-head re-review has not been completed. No merge or deployment was performed.

Public launch remains blocked

Preserve PUBLIC_RELEASE.md: historical runtime-data purge and credential review/rotation; verified historical WS account ownership; configured Cloud Run/PostgreSQL/Secret Manager and deployment opt-in; staging registration/session/guest/chat/provider/ownership/proxy tests; current-head zero-new-alert CodeQL; durable shared attachments or continued disablement; privacy/consent/audit gates before exposing system-primary or cross-owner features; then hostname/TLS/webhook and rollback evidence.

hmmm: do not treat source repairs, historical green checks, or a hostname as a merge approval or live deployment. CI/CodeQL are verified at the exact repair head; reviewer confirmation and the separate public-launch prerequisites remain unresolved.

Comment thread server/index.ts Fixed
@erinepshovel-code
erinepshovel-code marked this pull request as ready for review September 14, 2026 17:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-19T11:56:24.598166Z 5e01916 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7cfe3dee8d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/routes/chat.py
Comment thread python/services/tool_executor.py
Comment thread python/routes/chat.py Outdated
Comment thread server/index.ts Outdated
Comment thread server/auth/serv_auth_rate_limt_v0.0.0alpha.ts Outdated
Comment thread server/auth/guest-chat.ts
Comment thread server/auth/serv_auth_rate_limt_v0.0.0alpha.ts

Copy link
Copy Markdown
Collaborator Author

@codex address that feedback

Repair the currently active P1/P2 review findings on the exact current PR branch, and only those findings. In particular: gate the effective persisted orchestration mode/provider list before execution; preserve current_user_tier through both approval replay paths; keep attachment-only chat valid when attachments are present; reconcile CSP with the existing Google Fonts origins without weakening other directives; derive the rate-limit client identity from the actual trusted Google proxy suffix rather than a shared proxy address or an untrusted leftmost XFF value; settle guest token reservations to actual usage and release reservations on backend failure; and add bounded retention for expired rate_* probe rows. Add focused regression evidence and preserve existing public-release boundaries. Do not waive or disposition the still-reported CodeQL medium alert; that remains a separate exact-head gate.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

Copy link
Copy Markdown
Collaborator Author

@codex address that feedback

Repair the live exact-review findings on the current public-readiness branch, prioritizing the three P1s before P2s. P1 scope: gate the same effective persisted orchestration mode/provider list that execution receives; bind/reset current_user_tier around both approved replay paths; derive the rate-limit client identity safely for the actual Cloud Run proxy chain rather than a one-hop req.ip assumption. P2 scope: preserve attachment-only messages when attachments are enabled; reconcile CSP with the existing Google Fonts origins or remove/self-host them; settle guest token reservations to actual usage and release on backend failure; add bounded retention for expired rate_* security-probe rows. Add focused regressions for each repair, preserve public fail-closed boundaries, and do not widen release scope. Then request exact-head review and fresh CodeQL.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b04abfad4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/services/publ_acce_poli_v0.0.0alpha.py Outdated
Comment thread python/services/tool_executor.py
Comment thread .github/workflows/deploy.yml Outdated
Comment thread python/routes/tools.py

Copy link
Copy Markdown
Collaborator Author

@codex Address the current live exact-head review findings only; keep this PR unreleased and unmerged until every P1/P2 is repaired and re-reviewed. Prioritize P1s: gate the same persisted orchestration mode/providers execution uses; preserve current_user_tier across both approval replay paths; derive production client IP correctly across the declared Cloud Run proxy chain; and supply a source-backed admin bootstrap/promotion path instead of deploying ADMIN_EMAIL without the credential seedAdminUser requires. Then repair the live P2s without widening scope: attachment-only chat validation; Google Fonts CSP or remove/self-host those origins; atomic guest reservation settlement/release; bounded retention for rate_* probes; enforce actual orchestration call count rather than provider lanes; bind tier for CLI/Fleet tool-enabled inference; preserve admin discovery of system built-in tools. Add focused regressions for each repaired boundary, re-run the existing full Python/TypeScript/container/public-policy gates plus fresh CodeQL, and request exact-head review. Do not weaken public security/cost/privacy boundaries to make tests green. Preserve launch-only history purge, staging, Secret Manager, durable attachments, and memory/privacy gates as hmmm/release work rather than folding them into this repair.

Copy link
Copy Markdown
Collaborator Author

@codex address that feedback

Use the bounded repair scope in my immediately preceding comment. Repair every currently live P1/P2 thread on the current PR branch, add focused regressions, and keep release-only hmmm outside this code repair.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b04abfad4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/services/publ_acce_poli_v0.0.0alpha.py
Comment thread server/index.ts Outdated
Comment thread server/auth/serv_auth_rate_limt_v0.0.0alpha.ts

Copy link
Copy Markdown
Collaborator Author

@codex address that feedback

Repair the live P1 boundary defects on current head before any P2 cleanup or merge attempt. In particular: (1) gate the effective persisted orchestration mode/provider list actually executed; (2) preserve resolved account tier across approved tool replays and every tool-enabled entry point; (3) derive/normalize production client identity across Cloud Run proxy hops and encoded paths so paid-inference rate limits cannot be bypassed; (4) provision a documented fresh-deployment admin bootstrap path without manual DB edits; (5) replace suffix-only @interdependentway.org WS promotion with verified ownership or an explicit operator allowlist. Add focused regressions for each exploit path. Then address the remaining P2s, run the full public-release gates plus fresh CodeQL, and request a new exact-head review. Do not weaken the public boundary or expose system-primary/cross-owner features to make tests pass; preserve unresolved release prerequisites under hmmm.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b04abfad4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/routes/guest.py
Comment thread python/routes/fleet.py
Repair current authorization, provider routing, orchestration budgeting,
request metering, guest accounting, bootstrap, and discovery findings.
Add executable regressions and restrict workflow token permissions.
Preserve PUBLIC_RELEASE deployment-only gates and honest hmmm.
Comment thread scripts/chec_publ_rate_v0.0.0alpha.ts Fixed
Comment thread scripts/chec_publ_rate_v0.0.0alpha.ts Fixed
Comment thread server/auth/serv_auth_rate_limt_v0.0.0alpha.ts Fixed
Comment thread server/auth/serv_auth_rate_limt_v0.0.0alpha.ts Fixed
db.tier = "ws"
monkeypatch.setattr(domain, "check_scope_grant_tier", AsyncMock())
monkeypatch.setattr(policy_loader, "get_scope_categories", lambda: {"publish": {"label": "Publish", "description": "publication"}})
monkeypatch.setattr(policy_loader, "get_safety_floor_actions", lambda: set())
Keep CLI metering IP-backed without handling bearer secrets in Express.
Use exact CSP-origin assertions and configure the mocked provider test job.
Preserve every launch gate; no CodeQL alert waivers.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35ee3b19d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/auth/seed.ts
Comment thread python/services/publ_acce_poli_v0.0.0alpha.py Outdated

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 5e01916d83494645982fbc143c6db8aa2c877e37, concentrating on the two previously live P1 boundaries: legacy admin tier backfill and supporter access through multi-model Fleet. Treat all earlier-head findings as historical; report only current-head P1/P2 defects.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 5e01916d83

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Collaborator Author

Exact-head closeout at 5e01916d83494645982fbc143c6db8aa2c877e37: the two final P1 repairs are now on the branch; Clean Build, full PR build/test/container, provider contracts, Code Quality, and CodeQL all pass at this exact head; the requested current-head Codex re-review completed with no major issues. I am treating the older P1/P2 threads as repaired historical findings and resolving them before merge. Public deployment remains a separate decision governed by PUBLIC_RELEASE.md.

@erinepshovel-code
erinepshovel-code merged commit f4faf5c into main Sep 19, 2026
14 checks passed
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.

2 participants