D1-05 — Add bounded TaskSpec support for Scarcity Router #166 #42

Closed
opened 2026-10-03 09:17:51 +00:00 by adrian.tkacz · 1 comment
Owner

Parent: #30

Goal

Make the already selected real task BioMedical-IT/scarcity-router#166 representable by the Kernel without weakening the existing #143 safeguards or introducing a generic workflow DSL.

Target Scarcity Router base observed during selection:

5792d2dfa1d76fbd973baf2ef82b5fcf236342e9

Target issue:

#166 — Flaky test fixture: fake-process _feed thread can write after pipe close

Scope

  1. Preserve the existing #143 TaskSpec and its task-specific structural baseline checks.
  2. Refactor the currently #143-specific _baseline() logic only as far as necessary to support bounded task-specific structural validation.
  3. Add a TaskSpec for #166.
  4. Allowed target path for #166:

tests/test_openai_codex_acquisition.py

  1. Verification contract:
  • uv run python -m unittest tests.test_openai_codex_acquisition.SafeTermination -v
  • uv run python -m unittest tests.test_openai_codex_acquisition -v
  • repeat the module verification exactly 8 times through Kernel bounded repeat semantics
  • make check

#166 acceptance boundary

The implementation must preserve the real pipe/non-blocking writer fixture and establish safe feeder/write-descriptor ownership or shutdown ordering.

Do not accept:

  • arbitrary timeout increases;
  • sleep-based correctness;
  • skip/xfail;
  • swallowed assertions/exceptions;
  • reduced test coverage or repeat count;
  • replacing the real concurrency behavior with an inert mock.

The future candidate must include deterministic forced-interleaving regression coverage proving the unsafe baseline and the corrected ownership invariant.

Architecture constraint

Do NOT build:

  • a workflow DSL;
  • generic programmable validation expressions;
  • repository-specific code outside the bounded task contract.

Prefer a small typed per-task structural validator/policy seam.

Live execution

This issue authorizes Kernel support and TaskSpec registration only.

Do NOT execute #166.
Do NOT start provider inference.
Do NOT push a candidate to Scarcity Router.
Do NOT merge or deploy.

After merge, run a fresh zero-inference preflight before any live execution.

Parent: #30 ## Goal Make the already selected real task `BioMedical-IT/scarcity-router#166` representable by the Kernel without weakening the existing #143 safeguards or introducing a generic workflow DSL. Target Scarcity Router base observed during selection: `5792d2dfa1d76fbd973baf2ef82b5fcf236342e9` Target issue: `#166 — Flaky test fixture: fake-process _feed thread can write after pipe close` ## Scope 1. Preserve the existing #143 TaskSpec and its task-specific structural baseline checks. 2. Refactor the currently #143-specific `_baseline()` logic only as far as necessary to support bounded task-specific structural validation. 3. Add a TaskSpec for #166. 4. Allowed target path for #166: `tests/test_openai_codex_acquisition.py` 5. Verification contract: - `uv run python -m unittest tests.test_openai_codex_acquisition.SafeTermination -v` - `uv run python -m unittest tests.test_openai_codex_acquisition -v` - repeat the module verification exactly 8 times through Kernel bounded repeat semantics - `make check` ## #166 acceptance boundary The implementation must preserve the real pipe/non-blocking writer fixture and establish safe feeder/write-descriptor ownership or shutdown ordering. Do not accept: - arbitrary timeout increases; - sleep-based correctness; - skip/xfail; - swallowed assertions/exceptions; - reduced test coverage or repeat count; - replacing the real concurrency behavior with an inert mock. The future candidate must include deterministic forced-interleaving regression coverage proving the unsafe baseline and the corrected ownership invariant. ## Architecture constraint Do NOT build: - a workflow DSL; - generic programmable validation expressions; - repository-specific code outside the bounded task contract. Prefer a small typed per-task structural validator/policy seam. ## Live execution This issue authorizes Kernel support and TaskSpec registration only. Do NOT execute #166. Do NOT start provider inference. Do NOT push a candidate to Scarcity Router. Do NOT merge or deploy. After merge, run a fresh zero-inference preflight before any live execution.
Member

Implemented support-only in PR #43, targeting develop.

Base re-fetched/verified before branching: 3c6609176ed0741fc0517bafc229d01ae3213ffb. Exact HEAD: f6242c6e9001b5ab702b8ced5454446e779206df.

Changed: src/creatidy_kernel/adapters/task_execution.py, tests/test_task_166.py, README.md.

Acceptance evidence: closed typed per-task structural seam, unchanged #143 constructor/payload/digest and regression behavior; #166 single allowed path and exact SafeTermination/module/module-repeats-8/make check plan; 48 synthetic tests for baseline/candidate anti-weakening, exact Git subjects and read-only preflight. Controller authority and execution/recovery mechanisms are unchanged; no DSL or programmable validation language.

Checks:

  • uv run --locked pytest tests/test_task_166.py tests/test_task_execution.py tests/test_task_preflight.py tests/test_cli.py: 168 passed.
  • uv run --locked pytest tests/test_task_166.py after scanner remediation: 48 passed.
  • make check: passed fully, including 917 tests, basedpyright, boundaries and secrets.
  • make package-check: passed.
  • Complete staged diff inspected; git diff --cached --check and committed git diff --check origin/develop...HEAD passed; working tree clean.
  • make audit not applicable: dependencies, lockfile and tooling unchanged. Public SHA scanner false positives were resolved narrowly without changing scanner configuration.

Review remains pending; #42 remains open until integration. Remaining semantic boundary: a future #166 candidate's forced-interleaving proof of the unsafe baseline/corrected descriptor ownership requires independent review, not structural self-attestation.

#166 itself was NOT executed. No provider inference, live target preflight, Scarcity Router branch/PR/candidate push, merge or deploy. Fresh zero-inference preflight and separate owner execution authorization remain required after owner integration.

Implemented support-only in PR [#43](https://forgejo.creatidy.com/Creatidy/creatidy-kernel/pulls/43), targeting `develop`. Base re-fetched/verified before branching: `3c6609176ed0741fc0517bafc229d01ae3213ffb`. Exact HEAD: `f6242c6e9001b5ab702b8ced5454446e779206df`. Changed: `src/creatidy_kernel/adapters/task_execution.py`, `tests/test_task_166.py`, `README.md`. Acceptance evidence: closed typed per-task structural seam, unchanged #143 constructor/payload/digest and regression behavior; #166 single allowed path and exact SafeTermination/module/module-repeats-8/`make check` plan; 48 synthetic tests for baseline/candidate anti-weakening, exact Git subjects and read-only preflight. Controller authority and execution/recovery mechanisms are unchanged; no DSL or programmable validation language. Checks: - `uv run --locked pytest tests/test_task_166.py tests/test_task_execution.py tests/test_task_preflight.py tests/test_cli.py`: 168 passed. - `uv run --locked pytest tests/test_task_166.py` after scanner remediation: 48 passed. - `make check`: passed fully, including 917 tests, basedpyright, boundaries and secrets. - `make package-check`: passed. - Complete staged diff inspected; `git diff --cached --check` and committed `git diff --check origin/develop...HEAD` passed; working tree clean. - `make audit` not applicable: dependencies, lockfile and tooling unchanged. Public SHA scanner false positives were resolved narrowly without changing scanner configuration. Review remains pending; #42 remains open until integration. Remaining semantic boundary: a future #166 candidate's forced-interleaving proof of the unsafe baseline/corrected descriptor ownership requires independent review, not structural self-attestation. #166 itself was NOT executed. No provider inference, live target preflight, Scarcity Router branch/PR/candidate push, merge or deploy. Fresh zero-inference preflight and separate owner execution authorization remain required after owner integration.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Creatidy/creatidy-kernel#42
No description provided.