Skip to content

test(pm-stack): fully isolate health-priming server from machine state (#14167) - #14448

Merged
dezren39 merged 2 commits into
mainfrom
oc-code-f-14167-health-priming-isolation
Nov 24, 2026
Merged

dezren39 merged 2 commits into
mainfrom
oc-code-f-14167-health-priming-isolation

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Closes #14167.

Extends #14414 (which scoped only that test file but left the pm-core quota/fleet-feed schedulers running real collection).

This PR redirects every writable seam of the spawned server into the test tmp dir: HOME, freshness port, quota heartbeat/state/snapshots/forecast paths, fixture QUOTA_SUBCOMMAND (one valid provider row, no network/creds), META_RENEWAL_DISABLED, OPENDESIGN_RENEWAL_DISABLED, TURSO_QUOTA_SINK=0, pm-core jobs audit path, registry/comments/snapshots, projector off, blank Kaneo/Grist creds.

Evidence: bun test test/health-priming.test.ts → 2 pass / 0 fail (x5 runs, ~1.3s isolated); package-dir before/after readdir assertion passes; no machine-state writes.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T15:41:17Z",
    "session_id": "ses_e5df2002485ffeAniLmqSykAWG",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/fleet/14167-health-priming-20261124T145901Z-cb874eab",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/fleet/14167-health-priming-20261124T145901Z-cb874eab",
      "repo": "developing-today/code",
      "branch": "oc-code-f-14167-health-priming-isolation",
      "sha": "d134e9cfdf632f0caa9447c3df67bcbfdcc7b68d"
    },
    "auth_subject": "code-g",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

dezren39 and others added 2 commits November 24, 2026 08:20
)

The health-priming test spawned the real aggregator with the caller env and
its cwd in the package directory. Quota-current, the quota heartbeat, the
meta-renewal state and the gatherer (QUOTA_CURRENT_PATH) all defaulted into
the package dir, the freshness IPC port collided with a live aggregator on
4871, and background quota gather ran against the real machine.

Point every writable path at the test tmp dir, run the server from there,
and add a guard that fails if the run leaves files in the package dir.
#14167)

Extends #14414: redirect HOME, freshness port, quota heartbeat/state/
snapshots/forecast paths, fixture QUOTA_SUBCOMMAND, disable Meta/OpenDesign
renewal keepers and Turso sink, audit path, registry/comments/snapshots,
projector off, blank Kaneo/Grist creds. Server writes only under tmp dir;
no real quota gather during test.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: abf1e620-188b-441d-90fa-9a27c03c9dfc
Commits

Reviewing files that changed from the base of the PR and between 8fbe4af and d134e9c.

Files selected for processing: 1

  • pm-stack/aggregator/test/health-priming.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 57cc31d into main Nov 24, 2026
2 checks passed
@dezren39
dezren39 deleted the oc-code-f-14167-health-priming-isolation branch November 24, 2026 15:42
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.

pm-aggregator tests: a run leaves three files of machine state in the package directory, and runs the real quota gather

1 participant