Skip to content

fix(sessions): normalize package resource loading - #129098

Merged
steipete merged 1 commit into
mainfrom
codex/land-aug23-session-resource-owner
Aug 25, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/land-aug23-session-resource-owner

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • centralize parsed package targets and resource tables in the session package manager
  • make direct-file filters, filterless object resources, and local onMissing behavior share the canonical loader path
  • preserve package precedence, manifest discovery, automatic discovery, and path-containment checks

Root cause

Package filtering and resource loading derived the same target information through separate branches. Those branches disagreed for direct-file filters, filterless object resources, missing local resources, and some parsed target shapes.

Verification

  • current-main package-manager and resource-loader owner suites: 17/17
  • embedded agent-runner resource-loader sibling: 1/1
  • independent current-main owner proof: 17/17
  • assertion-safety ratchet passed with only the package-manager row moving from 8 to 3
  • format, lint, type, diff, containment, and exact-hash checks passed
  • mandatory isolated review and secret scan completed clean with no actionable findings
  • exact reviewed binary diff: b341a07747f76cf615a34ce167a934944a61d9c657b8e8ed66aaa3be30425792

Production delta: -158. Test delta: +80. Total net: -78. No public API, configuration, schema, migration, authorization, or documented behavior change.

Changelog: not required for this internal resource-loader repair.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 07:16
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 4:03 AM ET / 08:03 UTC.

ClawSweeper review

What this changes

The PR centralizes session package-resource resolution so direct local files, package filters, and missing sources follow the same loader path.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open for the labeled maintainer review: no blocking correctness finding was found, but the repair is not on current main and the protected maintainer label requires explicit human handling.

Priority: P2
Reviewed head: af1c8182cc2718f32da11bb27bf080489976f5bc
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative owner-boundary repair with behavior-level regression coverage and no actionable patch defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored internal repair is exempt from the external-contributor real-behavior-proof gate; the PR body supplies focused test evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored internal repair is exempt from the external-contributor real-behavior-proof gate; the PR body supplies focused test evidence.
Evidence reviewed 5 items Head owner-boundary repair: The package manager now resolves every source to a missing, file, or directory target before applying filters; direct files use the same enabled-state calculation as package resources.
Runtime consumer: The resource loader records metadata then filters resolved resources by enabled state before loading extensions, so the package manager is the correct owner for this repair.
Focused regression coverage: Tests cover disabled direct local extensions, filterless object sources matching string sources, all three missing-source classes, and the loader-level non-load outcome.
Findings None None.
Security None None.

Live Verification

Command: pnpm test src/agents/sessions/package-manager.test.ts src/agents/sessions/resource-loader.test.ts

Result: PASS (completed)

pnpm test src/agents/sessions/package-manager.test.ts src/agents/sessions/resource-loader.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129098-u6Bsav/target$ pnpm test src/agents/sessions/package-manager.test.ts src/agents/sessions/resource-loader
.test.ts
$ node --import tsx scripts/test-projects.mts src/agents/sessions/package-manager.test.ts src/agents/sessions/resource-loader.test.ts
pnpm test src/agents/sessions/package-manager.test.ts src/agents/sessions/resource-loader.test.ts
[test] starting test/vitest/vitest.agents-support.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129098-u6Bsav/target

 ✓  agents-support  src/agents/sessions/package-manager.test.ts (13 tests) 138ms
 ✓  agents-support  src/agents/sessions/resource-loader.test.ts (4 tests) 164ms

 Test Files  2 passed (2)
      Tests  17 passed (17)
   Start at  08:04:42
   Duration  9.05s (transform 8.16s, setup 1.60s, import 7.93s, tests 302ms, environment 0ms)

[test] passed 1 Vitest shard in 12.72s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129098-u6Bsav/target$ pnpm test src/agents/sessions/package-manager.test.ts src/agents/sessions/resource-loader
.test.ts
$ node --import tsx scripts/test-projects.mts src/agents/sessions/package-manager.test.ts src/agents/sessions/resource-loader.test.ts






























Assertions:

  • PASS expect_output: Test Files
  • PASS expect_output: Tests

How this fits together

Session settings supply local, npm, git, and package resource sources to the package manager. It resolves enabled extensions, skills, prompts, and themes for the session resource loader to load into an agent session.

flowchart LR
  A[Session settings] --> B[Package source parsing]
  B --> C[Resolved package target]
  C --> D[Resource discovery and filters]
  D --> E[Enabled resource tables]
  E --> F[Session resource loader]
  F --> G[Agent session resources]
Loading

Decision needed

Question Recommendation
Should the session-package owner accept this canonical target-resolution refactor for merge once exact-head checks are current? Accept canonical resolution: Merge after confirming the focused package-manager and resource-loader evidence still applies to the exact head.

Why: The PR is a substantial internal owner-module simplification and carries the protected maintainer label, so automated review should not substitute for the required human merge judgment.

Before merge

None.

Agent review details

Security

None.

PR surface

Source -158, Tests +80, Other 0. Total -78 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 178 336 -158
Tests 2 81 1 +80
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 4 260 338 -78

Review metrics

Metric Value Why it matters
Production versus test delta production -158; tests +80; assertion baseline 1 changed line The bug fix removes duplicated package-resolution branches while adding focused owner and consumer regressions.

Stored data model

Persistent data-model change detected: serialized state: src/agents/sessions/package-manager.test.ts, serialized state: src/agents/sessions/package-manager.ts, serialized state: src/agents/sessions/resource-loader.test.ts, unknown-data-model-change: src/agents/sessions/package-manager.test.ts, unknown-data-model-change: src/agents/sessions/package-manager.ts, vector/embedding metadata: src/agents/sessions/package-manager.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Merge the single canonical package-target flow after the session-package owner confirms the focused regression coverage and exact-head checks are current.

Do we have a high-confidence way to reproduce the issue?

Yes—source-reproducible with high confidence: current main's direct local-file branch marks the extension enabled without consulting its package filter, and the added focused tests encode that case. The read-only review did not execute the test command.

Is this the best way to solve the issue?

Yes: placing target normalization and filter application in the package manager preserves one authoritative enabled-state flow; filtering later in the resource loader would retain the split policy the patch removes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7ba58abd93d6.

Labels

Label justifications:

  • P2: This is a bounded repair to session resource loading with limited blast radius, pending maintainer review.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored internal repair is exempt from the external-contributor real-behavior-proof gate; the PR body supplies focused test evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Authored this repair and multiple prior merged changes to the same package-resource owner, including isolated workspace and path-containment work. (role: recent package-manager contributor; confidence: high; commits: af1c8182cc27, 0f9185938236, add30d455d03; files: src/agents/sessions/package-manager.ts)
  • Vincent Koc: Authored the earlier refactor that introduced the shared top-level resource collection in this owner module. (role: shared resource-collection contributor; confidence: medium; commits: 2ff8fcab0704; files: src/agents/sessions/package-manager.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-25T07:21:59.821Z sha af1c818 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 315969f into main Aug 25, 2026
306 checks passed
@steipete
steipete deleted the codex/land-aug23-session-resource-owner branch August 25, 2026 09:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant