fix(trajectory): tolerate partial skill snapshot entries in support capture#84797
Conversation
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach string methods in buildTrajectoryRunMetadata, and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. PR rating What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land this replacement PR after exact-head CI finishes green, keeping the narrow consumer-side tolerance while leaving any producer-side cleanup as a separate follow-up. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows undefined skill path/name values can reach string methods in buildTrajectoryRunMetadata, and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Is this the best way to solve the issue? Yes. The PR is a narrow consumer-side hardening with focused regression tests and does not weaken the existing symlink-escape rejection boundary. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3156d94bcab0. |
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Neon Test Hopper Hatch commandComment Hatchability rules:
Rarity: 🌱 uncommon. What is this egg doing here?
|
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
…apture buildSkillsCapture and redactPathForSupport crash with "Cannot read properties of undefined (reading 'startsWith' | 'localeCompare')" when skillsSnapshot.resolvedSkills contains entries with undefined name/filePath/baseDir. This happens in practice when a skill is rejected by the symlink-escape guard in src/agents/skills/workspace.ts: the [skills] warn log fires, but a partial entry still reaches the support-capture path. Downstream, runEmbeddedAttempt builds the trajectory run metadata on every turn, the undefined fields hit String-method calls, and the entire agent turn fails with reason=unknown (burning through the model-fallback chain, which all share this code path). Defensive consumer fix: - redactPathForSupport: widen file arg to string | null | undefined, return "" for non-string input - buildSkillsCapture: filter entries without a string name; if every resolvedSkills entry is filtered out, fall back to skillsSnapshot.skills so support bundles don't lose the skill inventory entirely; null-safe localeCompare comparator Security posture unchanged -- the symlink-escape rejection in src/agents/skills/workspace.ts still refuses to load escaped symlinks. This PR only prevents the downstream support-capture consumer from crashing on the partial entries the rejection path leaves behind. A producer-side cleanup (making symlink-escape rejects either skip the entry or emit a placeholder name) is a reasonable follow-up but has broader ripple; keeping this PR tightly scoped. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
CI check-test-types was failing on src/trajectory/metadata.test.ts because
tsgo:test is stricter than local pnpm check. Rejected sourceInfo: {} and
bare 'undefined' assignments against typed SourceInfo / string fields.
Fill sourceInfo with a real SourceInfo shape for the valid 'alpha' entry,
cast the intentionally-partial entries to ResolvedSkillEntry via an
'as unknown as' bridge so the intent (simulating a symlink-escape reject
leaking through) stays explicit without weakening the type on the valid
branch.
Tests: 6 passed (unchanged). tsgo:core:test clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
99a204b to
ecb3df6
Compare
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
…apture (openclaw#84797) Summary: - This PR filters partial skill snapshot entries in trajectory support metadata, accepts nullish support-redaction paths, adds regression tests, and records the fix in the changelog. - Reproducibility: yes. Source inspection on current main shows undefined skill path/name values can reach str ... and the related source PR provides redacted live before/after gateway logs for the symlink-escape scenario. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(trajectory): tighten test types for partial skill entries - PR branch already contained follow-up commit before automerge: fix(trajectory): tolerate partial skill snapshot entries in support c… Validation: - ClawSweeper review passed for head ecb3df6. - Required merge gates passed before the squash merge. Prepared head SHA: ecb3df6 Review: openclaw#84797 (comment) Co-authored-by: Luke Boyett <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
Makes #71185 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.
Known failing checks:
ClawSweeper 🐠 replacement reef notes:
Co-author credit kept:
fish notes: model gpt-5.5, reasoning high; reviewed against 99a204b.