mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
* fix(continuous-learning-v2): observer background process crashes immediately Three bugs prevent the observer from running: 1. Nested session detection: When launched from a Claude Code session, the child process inherits CLAUDECODE env var, causing `claude` CLI to refuse with "cannot be launched inside another session". Fix: unset CLAUDECODE in the background process. 2. set -e kills the loop: The parent script's `set -e` is inherited by the subshell. When `claude` exits non-zero (e.g. max turns reached), the entire observer loop dies. Fix: `set +e` in the background process. 3. Subshell dies when parent exits: `( ... ) & disown` loses IO handles when the parent shell exits, killing the background process. Fix: use `nohup /bin/bash -c '...'` for full detachment, and `sleep & wait` to allow SIGUSR1 to interrupt sleep without killing the process. Additionally, the prompt for Haiku now includes the exact instinct file format inline (YAML frontmatter with id/trigger/confidence/domain/source fields), since the previous prompt referenced "the observer agent spec" which Haiku could not actually read, resulting in instinct files that the CLI parser could not parse. * fix: address review feedback on observer process management - Use `env` to pass variables to child process instead of quote-splicing, avoiding shell injection risk from special chars in paths - Add USR1_FIRED flag to prevent double analysis when SIGUSR1 interrupts the sleep/wait cycle - Track SLEEP_PID and kill it in both TERM trap and USR1 handler to prevent orphaned sleep processes from accumulating - Consolidate cleanup logic into a dedicated cleanup() function * fix: guard PID file cleanup against race condition on restart Only remove PID file in cleanup trap if it still belongs to the current process, preventing a restarted observer from losing its PID file when the old process exits. |
||
|---|---|---|
| .. | ||
| api-design | ||
| article-writing | ||
| backend-patterns | ||
| clickhouse-io | ||
| coding-standards | ||
| configure-ecc | ||
| content-engine | ||
| content-hash-cache-pattern | ||
| continuous-learning | ||
| continuous-learning-v2 | ||
| cost-aware-llm-pipeline | ||
| cpp-coding-standards | ||
| cpp-testing | ||
| database-migrations | ||
| deployment-patterns | ||
| django-patterns | ||
| django-security | ||
| django-tdd | ||
| django-verification | ||
| docker-patterns | ||
| e2e-testing | ||
| eval-harness | ||
| foundation-models-on-device | ||
| frontend-patterns | ||
| frontend-slides | ||
| golang-patterns | ||
| golang-testing | ||
| investor-materials | ||
| investor-outreach | ||
| iterative-retrieval | ||
| java-coding-standards | ||
| jpa-patterns | ||
| liquid-glass-design | ||
| market-research | ||
| nutrient-document-processing | ||
| postgres-patterns | ||
| project-guidelines-example | ||
| python-patterns | ||
| python-testing | ||
| regex-vs-llm-structured-text | ||
| search-first | ||
| security-review | ||
| security-scan | ||
| skill-stocktake | ||
| springboot-patterns | ||
| springboot-security | ||
| springboot-tdd | ||
| springboot-verification | ||
| strategic-compact | ||
| swift-actor-persistence | ||
| swift-concurrency-6-2 | ||
| swift-protocol-di-testing | ||
| swiftui-patterns | ||
| tdd-workflow | ||
| verification-loop | ||
| visa-doc-translate | ||