Skip to content

Bound extension writes and revision history resources - #268

Merged
admdly merged 4 commits into
mainfrom
codex/extensions-resource-hardening
Oct 6, 2026
Merged

admdly merged 4 commits into
mainfrom
codex/extensions-resource-hardening

Conversation

@admdly

@admdly admdly commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Extension writes can accumulate retained history and amplify moderation reads. This change bounds raw request bodies and accepted writes per account/developer, tracks retained bytes and record counts transactionally, and returns metadata-only revision lists with authorized content fetched on demand. Aggregate usage is measured without imposing whole-system admission caps.

Reviewed history can be compacted in bounded batches while preserving pending and published bodies, audit metadata and content hashes. Retention defaults to dry-run. Cleanup and inventory logging share one hourly cron; oversized legacy content remains stored and is guarded before reads.

Configuration and compatibility

  • Adds D1 migration 0026_resource_bounds.sql for accounting, accepted-write events and retention metadata.
  • Adds the EXTENSION_WRITE_RATE_LIMITER binding, one hourly maintenance/inventory cron trigger, and EXTENSIONS_RETENTION_MODE=dry-run in wrangler.jsonc.
  • Revision lists now return summaries; clients must fetch individual revision content through the owner/moderator-authorized detail endpoint. This requires the corresponding Extensions client update; legacy card website/download URLs may now be null instead of clipped links.
  • Compaction requires explicit activation after backup and inventory review. Admission backend failures return 503 with Retry-After; rate exhaustion returns 429, and retained quotas return 409.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 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
🔒 Security Review ✅ Completed 2026-10-06T23:25:48.765410Z 9de256b PR opened
ℹ️ 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
api 61da131 Oct 06 2026, 11:53 PM

@admdly admdly self-assigned this Oct 6, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread src/services/extensions/v2/db/errors.ts
Comment thread src/services/extensions/v2/schemas/common.ts Outdated
Comment thread src/services/extensions/v2/db/extensions.ts Outdated
Comment thread src/services/extensions/v2/db/migrations/0026_resource_bounds.sql
Comment thread src/services/extensions/v2/db/schema.ts Outdated
Comment thread src/services/extensions/v2/db/resource-inventory.sql
Comment thread src/services/extensions/v2/README.md Outdated
Comment thread src/services/extensions/v2/db/extensions.ts Outdated
Comment thread src/services/extensions/v2/routes/owner-extensions.ts Outdated
Comment thread src/services/extensions/v2/db/revisions.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 31 files

Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.

Turn on auto-fix | Re-trigger cubic

Comment thread src/services/extensions/v2/middleware.ts Outdated
Comment thread src/services/extensions/v2/README.md
Comment thread src/services/extensions/v2/middleware.ts Outdated
Comment thread src/services/extensions/v2/db/migrations/0026_resource_bounds.sql
Comment thread src/services/extensions/v2/db/extensions.ts Outdated
Comment thread src/services/extensions/v2/resource-limits.ts Outdated
Comment thread test/services/extensions/v2/migrations.test.ts
Comment thread src/services/extensions/v2/routes/owner-extensions.ts Outdated
Comment thread src/services/extensions/v2/routes/moderation.ts
Comment thread src/services/extensions/v2/db/resource-inventory.sql Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 16 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread src/services/extensions/v2/db/extensions.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Requires human review: Adds resource quotas, rate limiting, retention compaction, and a D1 migration with a breaking revision-list/detail contract. Needs human sign-off on quota/retention policy, schema migration, and API contract changes.

Turn on auto-fix | Re-trigger cubic

@admdly
admdly merged commit f42a15b into main Oct 6, 2026
9 checks passed
@admdly
admdly deleted the codex/extensions-resource-hardening branch October 6, 2026 23:57
@admdly
admdly restored the codex/extensions-resource-hardening branch October 6, 2026 23:58
@admdly
admdly deleted the codex/extensions-resource-hardening branch October 6, 2026 23:58
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