Task — engineering-spec@1

gates.env regeneration names its backup and the durable home

doneTASK-IMP-095
module improvement · class product · priority p2 · created 2026-07-17 · shipped 2026-07-17
depends on none · blocks none

TASK-IMP-095: gates.env regeneration names its backup and the durable home

Summary

Every install regenerates gates.env and silently moves an edited prior copy to a timestamped .bak. The design is fine - config.yaml is the durable override home - but the operator learns that nowhere near the moment their edit vanishes. When the regenerated file differs from the prior one, print one line naming the backup path and pointing at config.yaml.

Problem

A silent clobber of an operator-edited file is a trust leak even when a backup exists: the sachviet run only found the .bak by listing the directory.

Proposed Solution

In step 3, after writing the new gates.env: if a prior copy existed and differs (cmp) from the regenerated file, print cyberos install: gates.env regenerated (previous kept at <bak>); durable overrides belong in .cyberos/config.yaml. Identical regeneration stays silent, and the freshly-created case (no prior file) stays silent.

Alternatives Considered

Success Metrics

Scope

In scope: the diff check, the one message line, hygiene scenarios.

Out of scope / Non-Goals

Dependencies

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

TASK-IMP-095-gates-env-regen-notice spec audit - audit_rubric@2.0 (machine floor + judgment)

Machine floor: task-lint clean (the batch's two TRACE-001 misses - uncited suite-landing clauses in 093/094 - were caught by the lint on first run and fixed before audit; the governed loop working as built). Judgment families: metrics carry baseline/target/deadline grounded in run evidence or the recorded 2026-07-16 research; alternatives distinct with real rejection reasons; scope subsections present; ops-verified ACs carry explicit rationales; COND-004 truthful; cone-sharing (install.sh trio, build.sh pair, ship-tasks.md pair) declared in Dependencies per §11a so the batch schedule serializes correctly.

ISSUE ISS-001 (QA-004, wontfix-info): consumer-repo and single-prose-line ACs are ops-verified with recorded-evidence rationales (same accepted pattern as TASK-IMP-086/087/090).

SUMMARY verdict: pass issues_open: 0 issues_human: 0 next_action: ship

§gate-log

Populated during implementation (ship-tasks testing phase).