Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

drift ack hardening: auto-stage the ack file; hard-fail dirty triggers on verify contracts (#1041)

Louis Choquel15e0a94ea8e9
diff --git a/.claude/skills/drift-review/SKILL.md b/.claude/skills/drift-review/SKILL.md
index 0e5e038d7..11c40b024 100644
--- a/.claude/skills/drift-review/SKILL.md
+++ b/.claude/skills/drift-review/SKILL.md
@@ -39,7 +39,7 @@ Work from the trigger diff to the review targets:
### 3. Stage, then ack
-The digest is computed from the **git index**, not the working tree: `git add` the trigger files (and any doc fixes you made). Staging is enough — no commit needed first, and unrelated unstaged changes elsewhere are fine. Take `drift ack`'s warnings about untracked or unstaged-modified matched files seriously: an unstaged edit is invisible to the ack.
+The digest is computed from the **git index**, not the working tree: `git add` the trigger files (and any doc fixes you made). Staging is enough — no commit needed first, and unrelated unstaged changes elsewhere are fine. Take `drift ack`'s warnings about untracked or unstaged-modified matched files seriously: an unstaged edit is invisible to the ack. For a contract with verify commands, a matched unstaged or untracked file is a hard error (the verify run would certify content the digest does not cover) — stage the files, then re-run.
```bash
make drift-ack CONTRACT=<id> RATIONALE="<honest sentence>" BY="<your identity>"
@@ -55,7 +55,7 @@ As an agent, always pass `BY` with your **own actual identity** — the model yo
### 4. Verify and commit
-`make drift-check` must pass. Commit the ack file(s) under `.drift/acks/` **together with the change they cover** — the rationale lands in the PR diff next to the change, which is the audit trail. Never hand-edit files under `.drift/acks/`.
+`make drift-check` must pass. `drift ack` stages the ack file it writes; commit the ack file(s) under `.drift/acks/` **together with the change they cover** — the rationale lands in the PR diff next to the change, which is the audit trail. Never hand-edit files under `.drift/acks/`.
## Mandatory: log the dogfood observation
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b35eafb07..bd7f61cc4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,7 +24,7 @@
- **Comprehensive input error handling:** A suite of typed errors for input shaping failures (`WrongScalarKindError`, `ListWhereSingularError`, `MultiplicityCountMismatchError`, `StructureValidationError`, `UnknownInputNameError`) that provide clear hints and render the expected JSON shape.
- **CLI `--explicit` flag:** Added `--explicit` to `pipelex build inputs` and `pipelex-agent inputs` to generate the legacy `{"concept", "content"}` envelope templates.
- **Subject-grants registry — the keyword-only convention hardened:** a positional first parameter ("subject") in `pipelex/` source is now legal only under an explicit grant recorded in `subject_grants.toml` at the repo root, carrying the subject's param name and an honest, def-specific review rationale — every grant in the registry has been individually reviewed against the grant rubric. `pipelex-dev subject-grant` is the sole registry writer; the `check-keyword-only` AST guard enforces the registry symmetrically (an ungranted subject fails, and so does a stale grant whose def was renamed, moved, demoted, or newly carved out) in `make check`, CI, and the edit-time hook. Subjects typed `bool`/`int`/`float` are banned outright — no grant can cover them. The registry schema is strict: exactly `param` + `rationale`, unknown keys fail the check. See `docs/contribute/keyword-only-arguments.md`.
-- **Drift contracts (`pipelex-dev drift plan|check|ack`):** Deterministic review obligations between code and docs. A root `drift.toml` declares contracts ("when these trigger files change, these review targets must be re-examined and the examination recorded"); committed ack files under `.drift/acks/` record each fulfilled review with a digest, reviewer, and rationale. A contract is fulfilled iff its stored ack digest equals the digest recomputed from the current tree (staged blob OIDs from the git index — no base ref, no timestamps), so trigger edits, matched-file adds/deletes, and contract-definition edits all reopen it. `make drift-check` gates the `make check` aggregate and runs as an advisory CI job; `make drift-plan` prints per-contract Markdown packets with exact per-file changes since the last ack; `make drift-ack CONTRACT=… RATIONALE="…"` runs the contract's verify commands then records the review. Seeded with contracts for the config docs, the CLI docs, and the keyword-only convention spec; workflow documented in `docs/contribute/drift-contracts.md`.
+- **Drift contracts (`pipelex-dev drift plan|check|ack`):** Deterministic review obligations between code and docs. A root `drift.toml` declares contracts ("when these trigger files change, these review targets must be re-examined and the examination recorded"); committed ack files under `.drift/acks/` record each fulfilled review with a digest, reviewer, and rationale. A contract is fulfilled iff its stored ack digest equals the digest recomputed from the current tree (staged blob OIDs from the git index — no base ref, no timestamps), so trigger edits, matched-file adds/deletes, and contract-definition edits all reopen it. `make drift-check` gates the `make check` aggregate and runs as an advisory CI job; `make drift-plan` prints per-contract Markdown packets with exact per-file changes since the last ack; `make drift-ack CONTRACT=… RATIONALE="…"` runs the contract's verify commands then records the review and stages the ack file it writes, so the local gate checks the same index the commit is built from (and if staging that ack fails, the ack file is removed rather than left unstaged, so a later check reports a missing ack instead of a false green). For a contract with verify commands, a trigger file left unstaged-modified or untracked is a hard ack error (the verify run would certify content the digest does not cover) — checked both before and after the verify commands, so a trigger the commands themselves format or generate is caught too; for other contracts it stays a warning. Seeded with contracts for the config docs, the CLI docs, and the keyword-only convention spec; workflow documented in `docs/contribute/drift-contracts.md`.
### Changed
- (Breaking) **Keyword-only demotions across the public API:** the subject-grant review demoted every positional first parameter that failed the grant rubric to keyword-only, and external code calling these surfaces positionally (or subclassing them with positional signatures) breaks. Notable demoted families: the `PipeAbstract` run family (`run_pipe`, `dry_run_pipe`, `validate_before_run`, … — `job_metadata`/`visited_pipes` now keyword-only), `StuffContent.rendered_for_prompt`/`rendered_for_template_async` (`text_format`) and the `TextFormatRenderable`/`ImageRenderable` protocols with all their implementations, the `LibraryManagerAbstract` load family (`library_id`), `ensure_pipelex_booted` (`config_overrides`), `pipeline_run_setup` (`execution_config`), `ConceptLibrary.is_compatible` (`tested_concept`), `GraphTracerProtocol.setup` (`graph_id`), the `PromptImageFactory`/`PromptDocumentFactory` content factories (`uri`), the model-manager/backend-library setup+load (`secrets_provider`), the reporting protocol's `set_event_log`/`clear_event_log` (`context_key`), and assorted tools helpers (`pluralize`/`count_with_noun`, `LogLevel.from_int`, `set_dry_run_forced`, …).
diff --git a/docs/contribute/drift-contracts.md b/docs/contribute/drift-contracts.md
index aec232d01..995dfe456 100644
--- a/docs/contribute/drift-contracts.md
+++ b/docs/contribute/drift-contracts.md
@@ -39,16 +39,16 @@ make drift-plan
It prints one Markdown packet per open contract: the description, exactly which trigger files were added/removed/modified since the last ack, the review targets, the verify commands, and the previous reviewer's rationale. To fulfill a contract:
1. **Review the targets against the trigger changes.** Actually read them. Update whatever is stale. "Nothing to update" is a legitimate outcome — say so in the rationale.
-2. **Stage the trigger files:** `git add` them (staging is enough; you don't need to commit first, and other unstaged changes elsewhere are fine). **The digest is computed from the git index, not the working tree** — an unstaged edit or an untracked file is invisible to the ack, and `drift ack` warns when it sees one that matches the triggers.
+2. **Stage the trigger files:** `git add` them (staging is enough; you don't need to commit first, and other unstaged changes elsewhere are fine). **The digest is computed from the git index, not the working tree** — an unstaged edit or an untracked file is invisible to the ack, and `drift ack` warns when it sees one that matches the triggers. For a contract with `verify_commands` that warning escalates to a hard error: the verify commands run on the working tree, so a matching unstaged edit or untracked file means they certify content the digest does not cover. This coverage check runs both **before** the verify commands (so an already-dirty tree fails fast) and **after** them (so a trigger the verify commands themselves format or generate is caught too, not silently left out of the digest).
3. **Record the ack:**
```bash
make drift-ack CONTRACT=config-docs RATIONALE="Documented the new activity_queues setting; other config pages unaffected."
```
- This first runs the contract's `verify_commands` (each one `shlex`-split and run without a shell, from the repo root; the first failure aborts the ack), then recomputes the digest from the index and writes the ack file.
+ This first runs the contract's `verify_commands` (each one `shlex`-split and run without a shell, from the repo root; the first failure aborts the ack), then recomputes the digest from the index, writes the ack file, and stages it — the ack lands in the same index the check reads, so the local gate and the commit you are building agree. If staging the written ack fails (e.g. a locked git index), the ack file is removed rather than left unstaged, so a later `drift check` reports a missing ack instead of a false green.
-4. **Commit the ack file together with the change it covers.** The ack surfaces in the PR diff, so the reviewer sees the rationale next to the change — that is the audit trail.
+4. **Commit the ack file together with the change it covers** (it is already staged). The ack surfaces in the PR diff, so the reviewer sees the rationale next to the change — that is the audit trail.
`reviewed_by` defaults from `git config user.name`; agents pass `BY=<identity>` (e.g. a model name or session URL). The rationale is required and is the on-the-record review decision — write an honest sentence, not "docs fine".
diff --git a/docs/errors/platform-and-tooling.md b/docs/errors/platform-and-tooling.md
index 15361dd15..efffbd1c6 100644
--- a/docs/errors/platform-and-tooling.md
+++ b/docs/errors/platform-and-tooling.md
@@ -88,6 +88,10 @@ own page. Classes are grouped by subsystem.
## CLI
- [`AmbiguousInputsFilesError`](ambiguous-inputs-files-error.md) — Ambiguous inputs files
+- [`DriftAckError`](drift-ack-error.md) — Drift ack
+- [`DriftError`](drift-error.md) — Drift
+- [`DriftGitError`](drift-git-error.md) — Drift git
+- [`DriftManifestError`](drift-manifest-error.md) — Drift manifest
- [`PipelexCLIError`](pipelex-cli-error.md) — Pipelex CLI
- [`ReadinessCheckError`](readiness-check-error.md) — Readiness check
diff --git a/pipelex/cli/dev_cli/commands/drift/drift_cmd.py b/pipelex/cli/dev_cli/commands/drift/drift_cmd.py
index 598a2008b..312ca6c36 100644
--- a/pipelex/cli/dev_cli/commands/drift/drift_cmd.py
+++ b/pipelex/cli/dev_cli/commands/drift/drift_cmd.py
@@ -25,13 +25,14 @@ from pipelex.cli.dev_cli.commands.drift.core import (
find_issues,
match_files,
)
-from pipelex.cli.dev_cli.commands.drift.exceptions import DriftAckError, DriftError
+from pipelex.cli.dev_cli.commands.drift.exceptions import DriftAckError, DriftError, DriftGitError
from pipelex.cli.dev_cli.commands.drift.git_adapter import (
get_git_user_name,
get_repo_toplevel,
read_staged_files,
read_unstaged_modified,
read_untracked,
+ stage_file,
)
from pipelex.cli.dev_cli.commands.drift.models import (
ACKS_DIR_RELATIVE,
@@ -197,8 +198,17 @@ def _run_verify_commands(commands: Sequence[str], *, repo_root: Path, console: C
raise DriftAckError(msg)
-def _warn_uncovered_working_tree(contract: DriftContract, *, repo_root: Path, console: Console) -> None:
- """Warn when working-tree state lags the index: the ack covers staged content only."""
+def _check_working_tree_coverage(contract: DriftContract, *, repo_root: Path, console: Console) -> None:
+ """Warn when working-tree state lags the index: the ack covers staged content only.
+
+ For a contract with verify commands the warn escalates to a hard failure: verify
+ commands run on the working tree, so a matching unstaged edit or untracked file
+ means they would certify content the ack digest does not cover.
+
+ Raises:
+ DriftAckError: If the contract has verify commands and a matching trigger
+ file is unstaged-modified or untracked.
+ """
unstaged_matched = match_files(read_unstaged_modified(repo_root), patterns=contract.triggers, exclude=contract.exclude)
for path in unstaged_matched:
console.print(f"[yellow]⚠[/yellow] trigger file has unstaged modifications: {escape(path)}")
@@ -207,6 +217,13 @@ def _warn_uncovered_working_tree(contract: DriftContract, *, repo_root: Path, co
for path in untracked_matched:
console.print(f"[yellow]⚠[/yellow] untracked file matches triggers: {escape(path)}")
console.print(" Untracked files are not covered until staged (`git add`).")
+ if contract.verify_commands and (unstaged_matched or untracked_matched):
+ msg = (
+ "This contract has verify commands, and trigger files differ between the working tree and the index "
+ "(see warnings above): the verify commands run on content the ack digest does not cover. "
+ "Stage the files (`git add`) or drop the edits, then re-run — ack aborted, nothing written"
+ )
+ raise DriftAckError(msg)
def drift_ack_cmd(contract_id: str, *, rationale: str, reviewed_by_override: str | None = None, repo_root: Path | None = None) -> None:
@@ -227,11 +244,16 @@ def drift_ack_cmd(contract_id: str, *, rationale: str, reviewed_by_override: str
msg = "Cannot resolve the reviewer identity: set `git config user.name` or pass --by"
raise DriftAckError(msg)
+ _check_working_tree_coverage(contract, repo_root=resolved_root, console=console)
_run_verify_commands(contract.verify_commands, repo_root=resolved_root, console=console)
+ if contract.verify_commands:
+ # Verify commands run on the working tree and can format or generate a trigger
+ # file. Re-check afterward so the ack (digest hashed from the index below) cannot
+ # certify index content that differs from what the verify commands just ran against.
+ _check_working_tree_coverage(contract, repo_root=resolved_root, console=console)
staged_oids = read_staged_files(resolved_root)
digest_result = compute_current_digest(contract, contract_id=contract_id, staged_oids=staged_oids)
- _warn_uncovered_working_tree(contract, repo_root=resolved_root, console=console)
ack = DriftAck(
contract=contract_id,
@@ -243,7 +265,19 @@ def drift_ack_cmd(contract_id: str, *, rationale: str, reviewed_by_override: str
)
save_ack(ack, repo_root=resolved_root)
ack_path = ack_file_path(resolved_root, contract_id=contract_id)
- console.print(f"[green]✓[/green] Ack recorded for [cyan]{contract_id}[/cyan] at {ack_path.relative_to(resolved_root)}")
+ try:
+ stage_file(ack_path, repo_root=resolved_root)
+ except DriftGitError as exc:
+ # save_ack atomically overwrote any prior ack, so there is no ack to roll back to.
+ # Remove the unstaged ack so `drift check` (which reads acks from disk but hashes
+ # triggers from the index) reports a missing ack instead of a false green.
+ ack_path.unlink(missing_ok=True)
+ msg = (
+ f"Ack written but staging it failed ({exc}). Removed the unstaged ack file so a local "
+ "`drift check` reports a missing ack instead of a false green — re-run once the git index is writable"
+ )
+ raise DriftAckError(msg) from exc
+ console.print(f"[green]✓[/green] Ack recorded and staged for [cyan]{contract_id}[/cyan] at {ack_path.relative_to(resolved_root)}")
console.print(" Commit the ack file together with the change it covers.")
diff --git a/pipelex/cli/dev_cli/commands/drift/git_adapter.py b/pipelex/cli/dev_cli/commands/drift/git_adapter.py
index cc7ce3ae7..776c4916a 100644
--- a/pipelex/cli/dev_cli/commands/drift/git_adapter.py
+++ b/pipelex/cli/dev_cli/commands/drift/git_adapter.py
@@ -84,6 +84,11 @@ def read_untracked(repo_root: Path) -> list[str]:
return sorted(path for path in output.split("\0") if path)
+def stage_file(path: Path, *, repo_root: Path) -> None:
+ """Stage one file into the index (`drift ack` auto-stages the ack file it writes)."""
+ _run_git(["add", "--", str(path)], cwd=repo_root)
+
+
def get_git_user_name(repo_root: Path) -> str | None:
"""The configured git user.name, or None when unset (callers must then require --by)."""
try:
diff --git a/subject_grants.toml b/subject_grants.toml
index 04895fb7d..f0e87d248 100644
--- a/subject_grants.toml
+++ b/subject_grants.toml
@@ -508,6 +508,10 @@ rationale = "Guard/CLI helper: operates on the files; single operand."
param = "path"
rationale = "Guard/CLI helper: operates on the path; single operand."
+["pipelex/cli/dev_cli/commands/drift/drift_cmd.py::_check_working_tree_coverage"]
+param = "contract"
+rationale = "Checks the contract's working-tree coverage; single operand."
+
["pipelex/cli/dev_cli/commands/drift/drift_cmd.py::_issue_message"]
param = "issue"
rationale = "Operates on the issue; single operand."
@@ -524,10 +528,6 @@ rationale = "Operates on the repo_root; single operand."
param = "commands"
rationale = "Guard/CLI helper: operates on the commands; single operand."
-["pipelex/cli/dev_cli/commands/drift/drift_cmd.py::_warn_uncovered_working_tree"]
-param = "contract"
-rationale = "Warns about the contract's uncovered working tree; single operand."
-
["pipelex/cli/dev_cli/commands/drift/drift_cmd.py::drift_ack_cmd"]
param = "contract_id"
rationale = "Acks the drift contract identified by id; single operand."
@@ -556,6 +556,10 @@ rationale = "File op keyed by the repo_root path; single operand."
param = "repo_root"
rationale = "File op keyed by the repo_root path; single operand."
+["pipelex/cli/dev_cli/commands/drift/git_adapter.py::stage_file"]
+param = "path"
+rationale = "Stages the file at that path; verb-object with a single obvious operand, repo_root is keyword context."
+
["pipelex/cli/dev_cli/commands/drift/models.py::ack_file_path"]
param = "repo_root"
rationale = "File op keyed by the repo_root path; single operand."
diff --git a/tests/unit/pipelex/cli/dev/test_drift_ack_cmd.py b/tests/unit/pipelex/cli/dev/test_drift_ack_cmd.py
index a42652377..b4ef01b3f 100644
--- a/tests/unit/pipelex/cli/dev/test_drift_ack_cmd.py
+++ b/tests/unit/pipelex/cli/dev/test_drift_ack_cmd.py
@@ -10,11 +10,12 @@ import pytest
from typer.testing import CliRunner
from pipelex.cli.dev_cli.commands.drift.drift_cmd import drift_ack_cmd, drift_app, drift_check_cmd
-from pipelex.cli.dev_cli.commands.drift.exceptions import DriftAckError
+from pipelex.cli.dev_cli.commands.drift.exceptions import DriftAckError, DriftGitError
from pipelex.cli.dev_cli.commands.drift.git_adapter import read_staged_files
from pipelex.cli.dev_cli.commands.drift.models import ack_file_path, load_all_acks
if TYPE_CHECKING:
+ from pytest_mock import MockerFixture
from rich.console import Console
from tests.unit.pipelex.cli.dev.conftest import GitRepo
@@ -141,3 +142,50 @@ class TestDriftAckCmd:
output = drift_console.export_text()
assert "untracked file matches triggers" in output
assert "src/brand_new.py" not in load_all_acks(git_repo.root)["demo-docs"].trigger_files
+
+ def test_ack_file_is_auto_staged(self, git_repo: GitRepo) -> None:
+ """The ack lands in the same index `drift check` reads — no forgot-to-add false green."""
+ _seed_repo(git_repo)
+ drift_ack_cmd("demo-docs", rationale="Initial review.", repo_root=git_repo.root)
+ staged_paths = git_repo.git("diff", "--cached", "--name-only").splitlines()
+ assert ".drift/acks/demo-docs.toml" in staged_paths
+
+ def test_verify_contract_with_unstaged_trigger_fails_before_verify(self, git_repo: GitRepo) -> None:
+ """With verify commands, a dirty matching trigger is a hard error and the verify commands never run."""
+ marker = git_repo.root / "verify_ran.txt"
+ marker_command = f'{PYTHON} -c \'open("verify_ran.txt", "w").write("ran")\''
+ _seed_repo(git_repo, verify_commands=[marker_command])
+ git_repo.write("src/demo.py", content="x = 2 # unstaged\n")
+ with pytest.raises(DriftAckError, match="verify commands"):
+ drift_ack_cmd("demo-docs", rationale="Should not be written.", repo_root=git_repo.root)
+ assert not ack_file_path(git_repo.root, contract_id="demo-docs").exists()
+ assert not marker.exists()
+
+ def test_verify_contract_with_untracked_trigger_fails(self, git_repo: GitRepo) -> None:
+ _seed_repo(git_repo, verify_commands=[PASSING_VERIFY])
+ git_repo.write("src/brand_new.py", content="new = True\n")
+ with pytest.raises(DriftAckError, match="verify commands"):
+ drift_ack_cmd("demo-docs", rationale="Should not be written.", repo_root=git_repo.root)
+ assert not ack_file_path(git_repo.root, contract_id="demo-docs").exists()
+
+ def test_verify_that_dirties_a_trigger_fails_after_verify(self, git_repo: GitRepo) -> None:
+ """A verify command that rewrites a trigger is caught by the post-verify recheck — the ack never certifies stale index bytes."""
+ rewrite_trigger = f'{PYTHON} -c \'open("src/demo.py", "w").write("x = 2")\''
+ _seed_repo(git_repo, verify_commands=[rewrite_trigger])
+ # The tree is clean before verify (pre-check passes); the verify command then dirties the trigger.
+ with pytest.raises(DriftAckError, match="verify commands"):
+ drift_ack_cmd("demo-docs", rationale="Should not be written.", repo_root=git_repo.root)
+ assert not ack_file_path(git_repo.root, contract_id="demo-docs").exists()
+
+ def test_stage_failure_removes_written_ack(self, git_repo: GitRepo, mocker: MockerFixture) -> None:
+ """If staging the written ack fails, the ack file is removed so a later check reports a missing ack, not a false green."""
+ _seed_repo(git_repo)
+ mocker.patch(
+ "pipelex.cli.dev_cli.commands.drift.drift_cmd.stage_file",
+ side_effect=DriftGitError("git index locked"),
+ )
+ with pytest.raises(DriftAckError, match="staging"):
+ drift_ack_cmd("demo-docs", rationale="Staging will fail.", repo_root=git_repo.root)
+ assert not ack_file_path(git_repo.root, contract_id="demo-docs").exists()
+ with pytest.raises(SystemExit):
+ drift_check_cmd(repo_root=git_repo.root)
diff --git a/wip/drift-contracts/dogfood-log.md b/wip/drift-contracts/dogfood-log.md
index 865b01b3f..2fc01d2f3 100644
--- a/wip/drift-contracts/dogfood-log.md
+++ b/wip/drift-contracts/dogfood-log.md
@@ -4,3 +4,4 @@ One entry per ack. Verdicts: **real-catch** (the review found actual staleness),
- **2026-07-10 · keyword-only-convention · real-catch** — the guard gained the subject-grant registry (new violation kinds, literal-subject ban, symmetric staleness); the convention doc was materially stale and was rewritten as part of the same change — exactly the coupling this contract exists to enforce.
- **2026-07-10 · cli-docs · clean-pass** — the keyword-only sweep touched many pipelex/cli files (kwonly'd internal signatures, two escape hatches, call-site keywords); reviewed docs/tools/cli/ and the agent-CLI CLAUDE.md — no command, flag, or output changed, both targets stay accurate.
+- **2026-07-11 · config-docs · clean-pass** — opened by dev's Python-3.10 drop reaching the branch via the Phase-M merge (StrEnum import swap in `img_gen_job_components.py`); reviewed docs/configuration/ — no config field, default, or documented behavior changed. *(Backfilled 2026-07-12: the ack was recorded during the subject-grants regrind without its mandatory log entry — process slip, not a review slip.)*
diff --git a/wip/drift-contracts/pr-1040-review-notes.md b/wip/drift-contracts/pr-1040-review-notes.md
index 36f3cc2c9..3ecbf67ac 100644
--- a/wip/drift-contracts/pr-1040-review-notes.md
+++ b/wip/drift-contracts/pr-1040-review-notes.md
@@ -1,5 +1,7 @@
# PR #1040 review notes — deferred drift-tooling findings
+> **RESOLVED 2026-07-12** — both findings were implemented on `docs/Drift-hunt` (commit `8c7413afc`): A1's auto-staging verbatim, A2 as the narrow warn→fail escalation recorded below (not codex's blanket fail). The "why deferred" rationales underneath are the historical record of the original triage, no longer current.
+
Two codex findings on `pipelex/cli/dev_cli/commands/drift/drift_cmd.py` from the PR #1040 review pass. Both describe real code behavior (verified against the code), but neither is worth hardening now: the drift tool is an internal dev CLI, CI backstops the first, and the second is a documented design choice with a narrow failure mode. Captured here so the candidate fixes aren't lost.
## A1 — `drift ack` does not stage the ack file, so local `drift check` can false-green