Skip to content

Restore AI budget and authentication fixes that never reached main - #46

Merged
mptfire merged 2 commits into
mainfrom
fix/restore-ai-security-stack
Oct 14, 2026
Merged

mptfire merged 2 commits into
mainfrom
fix/restore-ai-security-stack

Conversation

@mptfire

@mptfire mptfire commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Main 7831282 still has the account/scope races and budget bypasses fixed in #39, #42 and #43. Those PRs were merged into their feature-branch bases after #37 had already been squashed into main; their fixes and regression tests therefore never reached main.

Reapply the reviewed patches together: atomic in-flight budget reservations and embedding/enrichment accounting; request-local authentication snapshots; and scoped-agent credential escalation prevention. Correct the security-audit integration record. This PR targets main directly.

Reproduction on current main: Alice's interleaved account request returns Bob; anonymous and limited-token requests inherit other credentials; scoped tokens mint/harvest unrestricted tokens; publisher AI usage stays zero; and embeddings/negative-overflow accounting bypass budgets. The copied original regressions fail before restoration and pass afterward.

Validation: full go test -race -timeout 10m ./... with only the environment-blocked TestCLI_Serve_Unix_Curl explicitly skipped, plus go vet. PostgreSQL remains covered by CI. Existing web baseline is 101 passing tests. No new AI behavior is added here; the per-account consent policy will be a separate change.

… main

Reapply #39/#42/#43 together after their feature-branch merges failed to propagate past the squash of #37. Restore the security regressions and correct the integration record.
@mptfire
mptfire merged commit a98114c into main Oct 14, 2026
2 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.

1 participant