Skip to content

feat: add native pframes OOM reproducer block - #1816

Open
AStaroverov wants to merge 3 commits into
mainfrom
feat/pframes-oom-block
Open

feat: add native pframes OOM reproducer block#1816
AStaroverov wants to merge 3 commits into
mainfrom
feat/pframes-oom-block

Conversation

@AStaroverov

@AStaroverov AStaroverov commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Adds a developer block for reproducing memory exhaustion in the native pframes instance used by Platforma Desktop. Clicking Run memory stress joins two N-row inputs into N² rows and sorts the result; the UI requests only the table shape. Input size is configurable, and opening the block does not start the stress workload.

Includes the block packages, workspace registration, lockfile entries, and usage instructions. Completed attempts use a fresh axis domain to avoid cached results. Actual OOM behavior depends on available memory, pframes limits, and spilling.

Validation:

  • All five block packages build successfully.
  • Type, lint, formatting, Tengo syntax, and block structure checks pass.
  • Native pframes smoke check: two 10-row inputs produce 100 rows and 5 columns.
  • Full OOM run remains manual; it was not executed during validation.

Greptile Summary

Adds a developer-only Platforma block that deliberately constructs and sorts a quadratic native pframes join, allowing Desktop developers to investigate memory-exhaustion behavior. Since the previous review, the table definition was extracted into a reusable builder and covered by a bounded native-driver regression test.

  • Adds the block kind, model, UI, empty Tengo workflow, facade package, workspace registration, and usage documentation.
  • Requires an explicit Run memory stress action; merely opening the page does not request the table shape.
  • Validates the configured input size before constructing two N-row columns whose inner join has N² rows.
  • Advances runId after each attempt so the next table uses a fresh axis domain rather than a cached result.
  • Tests the 10×10 join shape, repeated-input identity, and cache-busting identity.

Important touched terms

  • Block — A packaged Platforma extension comprising model, UI, workflow, kind, and facade components. This PR adds the pframes-oom developer block and registers all five packages in the workspace.
  • pframes / PFrame — Platforma’s native tabular computation engine and its column collection. The new block intentionally submits a high-cardinality join and sort to the native engine.
  • PTable definition — A declarative table query specifying source columns, joins, filters, and sorting. The definition is now isolated in createOomTableDefinition so production and regression-test paths share the same query.
  • Inner join — A join retaining combinations with matching shared-axis values. Two independently keyed N-row columns share a constant group value, producing N² joined records.
  • Axis domain — Metadata distinguishing the identity/context of a table axis. runId is incorporated into the shared axis domain to give completed attempts a fresh table identity.
  • Table shape — The table’s row and column counts without transferring all expanded records to the browser. The UI requests only this shape to trigger native execution while avoiding browser-side materialization.
  • Driver double — A test fixture wrapping the real native pframes engine with local blob storage. The new bounded test uses it to verify 100 rows, five columns, and table identity behavior.
  • Tengo workflow — Platforma’s packaged workflow program. This block includes an intentionally empty workflow because the stress operation runs through the UI pframe service in the Desktop host process.

Confidence Score: 5/5

The PR appears safe to merge; the previously requested core regression coverage is present and no new actionable defects remain.

The manually resolved previous finding is fully addressed by a bounded native-driver test that verifies the quadratic result shape and fresh identity when runId changes. The extraction into a shared table builder preserves runtime behavior, and the new test follows established driver setup and disposal patterns.

Important Files Changed

Filename Overview
etc/blocks/pframes-oom/model/src/table.ts Defines the validated quadratic join, sorting workload, and run-specific axis domain shared by the block and test.
etc/blocks/pframes-oom/model/src/table.test.ts Adds bounded native-driver coverage for quadratic shape and cache-busting table identity.
etc/blocks/pframes-oom/model/src/index.ts Connects model data to the extracted pframes table-definition builder.
etc/blocks/pframes-oom/ui/src/MainPage.vue Provides an explicit, guarded stress action, input sizing, warnings, and completion/error status.
etc/blocks/pframes-oom/README.md Documents intended usage, risk boundaries, workload sizes, and regression-test execution.
pnpm-workspace.yaml Registers the five new block packages in the monorepo workspace.

Sequence Diagram

sequenceDiagram
  actor Developer
  participant UI as Block UI
  participant Model as Block Model
  participant PF as Native pframes
  Developer->>UI: Select N rows
  Model->>Model: Build two N-row columns
  Developer->>UI: Run memory stress
  UI->>PF: getShape(table handle)
  PF->>PF: Inner join to N² rows
  PF->>PF: Sort both value columns
  PF-->>UI: Shape or resource-exhaustion failure
  UI->>Model: Increment runId
  Model->>Model: Build fresh axis domain
Loading

Reviews (2): Last reviewed commit: "test: cover pframes OOM join and cache i..." | Re-trigger Greptile

@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 09cc4dc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread etc/blocks/pframes-oom/model/src/index.ts Outdated
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.55%. Comparing base (a63e979) to head (09cc4dc).
⚠️ Report is 8 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1816      +/-   ##
==========================================
- Coverage   54.56%   54.55%   -0.01%     
==========================================
  Files         418      417       -1     
  Lines       21936    21932       -4     
  Branches     4913     4913              
==========================================
- Hits        11970    11966       -4     
  Misses       8529     8529              
  Partials     1437     1437              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AStaroverov

Copy link
Copy Markdown
Collaborator Author

@greptileai

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