Skip to content

Fix: limit widget data cache keys to declared query values - #510

Merged
SandObserver merged 1 commit into
mainfrom
fix/widget-data-cache-key
Oct 19, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/widget-data-cache-key

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Build the /api/widget-data cache key and ctx.params from endpoint plus the names the widget manifest lists in a new params field. Other query values are dropped.
  • Validate params in the manifest: at most 8 query parameter names, no duplicates, endpoint not listed.
  • Cap cached replies per widget at 16 in latest(), dropping the oldest settled entries and never a refresh in flight.
  • Declare seed in the System Summary manifest.

Testing
All green. Added tests for the parameter filter, manifest validation, the per-widget cap, junk query values sharing one refresh, and a guard that every value a data.js reads is declared.

Changelog

Added

  • Let a widget manifest list the query parameters its data function reads.

Fixed

  • Stop extra query values on widget data requests from filling server memory and multiplying upstream calls.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

Build the widget-data cache key and ctx.params from the endpoint and the
names a widget manifest lists in a new params field. Cap cached replies
at 16 per widget. System Summary declares seed.
@SandObserver SandObserver added the bug Something isn't working label Oct 19, 2026
@SandObserver
SandObserver merged commit c5229eb into main Oct 19, 2026
6 checks passed
@SandObserver
SandObserver deleted the fix/widget-data-cache-key branch October 19, 2026 04:51
stackyard-release Bot pushed a commit that referenced this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant