-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Context breakdown can label virtual bootstrap files as 'undefined' instead of falling back to path/basename #47941
Copy link
Copy link
Open
BingqingLyu/openclaw
#829Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
/context breakdown(or similar context reporting) can show a virtual bootstrap file asundefinedeven when the injected content is present and counted.In the observed case, a bootstrap hook injected a virtual file with:
path: 'SELF_IMPROVEMENT_REMINDER.md'virtual: trueThe context report then showed something like:
undefined: OK | raw 1966 chars (~492 tok) | injected 1966 chars (~492 tok)Why this looks like a display-layer bug
The content is clearly present (char/token counts are non-zero), so the problem is not "missing content". It appears the reporting path is using a missing/empty display name and rendering
undefinedinstead of falling back to:file.namefile.pathfile.path(virtual bootstrap file)Expected behavior
For virtual bootstrap files, context reporting should never render the label as literal
undefinedifpathor basename is available.Suggested fix
In the breakdown/reporting layer, normalize the label with a fallback chain similar to:
Also worth considering:
pathbut noname, display logic should still remain stableNotes
I also separately reported to the skill author that adding explicit
name+ dedupe in the hook would be a useful compatibility hardening. But even without that, the OpenClaw display layer should ideally avoid surfacing literalundefinedwhen enough metadata exists to label the item.