Conversation
|
Ran the recommended startup/restart smoke validation locally on branch issue-2-service-worker-startup, but fetch never started because the configured extension ID is not currently active in this Chrome profile. Evidence:
Unblock:
After that, rerun cold-start smoke (usage-check, restart Chrome, usage-check) and this PR can be reassessed for ready-to-merge. |
|
Update: retried smoke validation after setting EXTENSION_ID=ciekcbfgdpcfhlbohdjdachagblijjao via ./install.sh. Result remains blocked:
This indicates the extension ID configured in .env still does not correspond to an active loaded unpacked extension in the Chrome profile being used. Please confirm in chrome://extensions that ID ciekcbfgdpcfhlbohdjdachagblijjao is present and enabled for the unpacked extension loaded from /Users/david/Documents/git/llm-usage/extension. |
… coverage - Fix fetch page hardcoding ok:true regardless of worker status (now derives from status.ok) - Fix ingest_extension_result silently accepting partial results (now rejects missing providers) - Fix shell readlink -f portability for macOS BSD readlink - Fix bash 3.2 empty array expansion under set -u - Add shared typed fetch contract (FetchEnvelope, FetchStatus, FetchUsageMessage) - Add request_id correlation and deadline_ms timeout propagation end-to-end - Move extension/fetch.js into TypeScript build pipeline (src/extension/fetch.ts) - Switch extension builds to IIFE format (manifest lacks type:module) - Extract buildFetchStatus as pure testable function - Extract parseCopilotUsage as pure function, eliminate DOM parsing duplication - Add withHiddenTab lifecycle helper with single-ownership tab cleanup - Add unwrapScriptResult helper for consistent script result handling - Replace inline node -e status parsing with read-fetch-status.ts helper - Add validateEnvelope with actual field validation - Remove dead native-host launcher (usage_cache_host.sh) - Add --non-interactive flag and LLM_USAGE_NMH_DIR/LLM_USAGE_CACHE_DIR overrides - Add 66 tests across 10 test files (ingest, render, shell smoke, setup validation, fetch contract, background contract, copilot parser, extension base, read-fetch-status)
Summary
onStartupandonInstalledlisteners so Chrome wakes the extension worker on browser/profile start and install/updatechrome.runtime.sendMessageerror handling infetch.jsfetch_statusvia native messaging when no receiving end exists, sousage-checkfails fast instead of timing outTesting
Closes #2