Summary
Logging currently emphasizes compile/cache stage events but does not emit the runtime task lifecycle event names required by the contract.
Evidence
Contract Evidence:
- docs/project-ttl-language.md:206
- cmds/ttlc/internal/compiler/service.go:496
Current Gap
Logging currently emphasizes compile/cache stage events but does not emit the runtime task lifecycle event names required by the contract.
Proposed Scope
Acceptance Criteria
- Emit lifecycle events:
task_scheduled, task_started, task_cache_hit, task_cache_miss, task_completed, task_failed.
- Include required structured fields (
compile_stage, task_id, cache_key, cache_hit, invalidation_reason, worker_id, duration_ms, error_kind).
- Keep ANSI color/no-color behavior intact for operator-facing output.
- Provide deterministic event ordering guarantees where applicable.
Test Scenarios
- Successful execution path emits scheduled/start/completed events.
- Cache-hit path emits
task_cache_hit.
- Failure path emits
task_failed with error_kind.
Out of Scope
- External log shipping integrations.
- Metrics backend instrumentation.
Summary
Logging currently emphasizes compile/cache stage events but does not emit the runtime task lifecycle event names required by the contract.
Evidence
Contract Evidence:
Current Gap
Logging currently emphasizes compile/cache stage events but does not emit the runtime task lifecycle event names required by the contract.
Proposed Scope
Acceptance Criteria
task_scheduled,task_started,task_cache_hit,task_cache_miss,task_completed,task_failed.compile_stage,task_id,cache_key,cache_hit,invalidation_reason,worker_id,duration_ms,error_kind).Test Scenarios
task_cache_hit.task_failedwitherror_kind.Out of Scope