fix(worklog): three cold-start reliability improvements for preamble.sh - #29
Merged
Merged
Conversation
preamble.sh rejected --light (exit 2) even though SKILL.md and init.md documented it as a valid flag mapping to minimal mode. Add --light as a recognized alias that normalizes to --minimal before dispatch.
active_namespace and active_total were computed before the pull but used in the roster-health count comparison after it. If the pull adds or removes tasks, the stale pre-pull count masks cache-staleness. Re-compute both counts after the pull so the comparison uses current state.
…Ds in sync.md does not exist in the codebase. The actual session identifiers are CLAUDE_CODE_SESSION_ID, CODEX_SESSION_ID, CURSOR_SESSION_ID, and OPENAI_SESSION_ID (see bin/_lib.sh::resolve_session_id).
Verify preamble.sh rejects --bogus with non-zero exit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small independently-testable fixes for the Worklog preamble and sync mode, all surfaced by a cold-start protocol iteration pass:
1. Accept
--lightas a preamble aliaspreamble.shrejected--light(exit 2) even thoughSKILL.mdandinit.mddocument it as a valid flag mapping to minimal mode. Fixed by adding--lightas a recognized alias that normalizes to--minimalbefore dispatch.2. Re-compute active counts after pull
active_namespacewas computed before the pull but used in the roster-health count comparison after it. If the pull adds or removes tasks, the stale pre-pull count could mask cache-staleness. Fixed by re-computing both counts after the pull block.3. Fix stale
CLAUDE_HOOKenv var in sync.mdThe non-interactive guard referenced
$CLAUDE_HOOKwhich does not exist. Replaced with the correct session identifiers (CLAUDE_CODE_SESSION_ID,CODEX_SESSION_ID,CURSOR_SESSION_ID,OPENAI_SESSION_ID) used bybin/_lib.sh::resolve_session_id.Validation
bash tests/run.sh all: 75 pass, 0 failbash skills/worklog/tests/cache/test_stale_consumers.sh: okbash skills/worklog/tests/init/test_light_init.sh: all 3 checks pass (--minimal, --light, --bogus rejection)_worklogdogfood with--lightand--full: LDAP=oss, roster correct, no state mutationarchived/dir), no regression from these changesWorklog-Slug: worklog-protocol-efficiency