mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4720] [Feature]: Attributed fetch + per-extension traffic visibility for full-page personal extensions #2591
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2591
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Aug 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4720
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
In #4703, a phone-hosted instance served ~204 requests/min (multi-GB/hour) for two hours-plus, and the source was only identifiable by downloading and dissecting a 266 MB HAR: a full-page personal extension (a memo/notes board) was re-scanning every chat's messages (
GET /chats/<id>/messages?limit=100× 18 chats, back-to-back sweeps with ~0.15 s pause between sweeps) and its traffic was indistinguishable from Marinara's own.The full-page tier is an explicit "fully trust" grant, and that's the right model — but trust covers intent, not bugs. The memo extension's author almost certainly never intended an unthrottled full-table rescan; the user had no way to see that an extension was responsible (nothing in the UI attributes traffic), and the symptom presented as "Marinara drains my battery / eats my data plan," landing on this issue tracker.
Mechanically, the gap is visible in the injector: full-page extensions receive a frozen host API (
__marinaraRunFullPageExtension→FullPageExtensionApiinpackages/client/src/components/layout/PersonalExtensionInjector.tsx) that provides attributed storage, logging, and managed timers — but no fetch. Extensions reach the API through the page's rawwindow.fetch, so nothing counts, attributes, or bounds their requests.Proposed solution
Layered visibility first, enforcement only where it doesn't break the trust model:
api.fetchon the full-page host API. Extend the existing frozenFullPageExtensionApiwith afetchthat wrapswindow.fetch, tagging and counting requests (count + transferred bytes) per extension id — same pattern as the API's managedsetTimeout/setInterval. Extension-authoring docs should present it as the expected way to call the local API (rawwindow.fetchkeeps working; full-page code can always reach it — this is visibility, not a jail).api.fetch, and it is a diagnosis aid rather than a limiter.Explicitly not proposed: hard rate limits on full-page extensions. Their fetches are same-origin page fetches — indistinguishable from the app's own without cooperation — and the tier's consent screen already frames it as full trust. The #4703 failure was invisibility, not malice; bounding a trusted-but-buggy extension is the extension author's fix once the user can see the problem.
Alternatives considered
api.fetch); a non-cooperating script escapes towindow.fetch, so enforcement would give false confidence while breaking legitimate bursty extensions. Visibility gets ~all of the value with none of the false promises.Additional context
GET/PATCH /api/personal-extensions/<id>/storage).Template check
@SpicyMarinara commented on GitHub (Aug 7, 2026):
SpicyMarinara/Codex is implementing this in draft PR #4736 on
agent/assigned-issues-4718-4734.