ICW-E6S07T111-Specification: FR-078 Comprehensive Install Event-Contract Logging Quality
Task: E6:S07:T111
Related FR: FR-078
Host Task: T111-comprehensive-install-event-contract-logging-and-feedback-quality.md
Created: 2026-04-09
Executive Summary
Define a strict install event contract so every install step and sub-step can be reconstructed as intent -> action -> result, with deterministic correlation and redaction-safe payloads suitable for high-quality forensic analysis.
Problem Statement
Current install logging is helpful but mostly run/phase oriented, which can leave ambiguity around why decisions were made, what exact operation executed, and what concrete outcome followed. This limits root-cause precision and slows quality hardening.
T111 addresses this by defining contract-level telemetry completeness and deterministic event linkage.
Scope
In scope:
- Event schema and invariants for
intent,action, andresult. - Step/sub-step completeness across CLI and framework-specific installers.
- Deterministic correlation fields and timeline reconstruction rules.
- Failure-boundary behavior (partial failure still emits complete prior history).
- Redaction and secret-safety constraints.
- Backward-compatible coexistence with current text logging behavior.
Out of scope:
- Transport/submission path policy and workflow governance.
- Maintainer ingestion endpoints and submission lifecycle operations.
- User-account identity and external trust/auth flows.
Functional Invariants
-
Triad completeness invariant
Each emitted step event must include structuredintent,action, andresultsections (required fields enforced by schema/tests). -
Deterministic correlation invariant
Events must include stable correlation keys (install_run_id,step_id, parent/child relation) so multi-component runs can be reconstructed deterministically. -
Coverage invariant
All major install phases and required sub-steps in CLI + framework installers must emit contract-compliant events. -
Decision transparency invariant
Branch and decision points (mode/backend/fallback/retry/skip) must be represented with explicit rationale fields. -
Outcome normalization invariant
resultmust normalize status, exit code, duration, validation outcomes, and error class for comparable analysis. -
Failure-boundary invariant
On step failure, historical events remain complete up to boundary; terminal event must encode failure state and boundary metadata. -
Redaction invariant
Known secret-bearing fields and error text paths must pass redaction checks prior to persistence.
Ordering Contract (Instrumentation Rollout)
- Define canonical schema + required fields.
- Add emitter adapters in CLI install orchestrator.
- Extend framework installer hooks to emit compatible events.
- Add validators/tests for required field completeness and joinability.
- Reconcile docs and examples with finalized contract.
This order prevents partial adoption from creating schema drift.
Requirement Mapping (T111 AC)
- AC1: Every step/sub-step reconstructable as
intent -> action -> result. - AC2: Correlation metadata enables deterministic timeline reconstruction.
- AC3: Missing mandatory fields are blocked by tests/validators.
- AC4: Result payloads are normalized and comparable.
- AC5: Local artifacts contain enough detail for reproduction and triage.
- AC6: Redaction constraints validated by tests.
Non-Functional Constraints
- Performance: Contract logging overhead must remain bounded and monitored.
- Compatibility: Existing text logs remain supported during migration.
- Operability: Diagnostics remain concise and actionable.
- Determinism: Identical runs under same inputs should produce structurally consistent event graphs.
Edge Cases and Boundaries
- Installer emits nested sub-steps without explicit parent linkage.
- Retry loops produce duplicate semantic steps with different attempts.
- Fallback path triggers after backend or validation failure.
- Framework script logs without full context unless adapter bridges are present.
- Unexpected stderr includes sensitive fragments requiring redaction.
Boundary policy:
- Prefer explicit event representation over inferred reconstruction.
- Fail fast on schema-required-field absence in test mode.
- Never persist raw secret-bearing payloads.
Acceptance Assertions
- Planning artifact defines explicit, testable checks for all ACs.
- Scope boundary with submission/governance workstream (FR-079/T112) is explicit.
- Host task and planning artifacts are bidirectionally aligned for implementation handoff.