S00-013: Bound runner prompts with explicit required task input reads

Changes: Keep startup instructions and exact context packets inline while listing supplementary task inputs as mandatory project reads. Preserve root containment, missing-artifact guidance and budget failures. Add S21-006 exact UI context regression and cover claim/review budgets for all tasks; leave stdin delivery unchanged.
Validation: make check passed all 68 tests, including delayed UTF-8 stdin/EOF, timeout and terminal-transition checks. All 556 current prompts fit 80000 characters; largest 77693. git diff --check passed. Foundation checks do not establish application readiness.

Task: S00-013
Agent: auto-ci-cd-5f68f03dd33b
Role: ci-cd
Action: claim
Status: review

Task title: Bound oversized S21-006 runner context without truncating requirements
This commit is contained in:
wt committed 2026-10-15 01:40:32 +07:00
1 parent c28412ae8f
commit b1014f36c9
9 files changed
+114 -12

No files matched your search

+27 -1
View File
@@ -281,11 +281,37 @@ else:
class FoundationRunnerTests(unittest.TestCase):
def test_ui_acceptance_prompt_keeps_exact_context_and_explicit_upstream_reads(self):
runner = RUN_MODULE.Runner(ROOT, {})
task = runner.tracker.task('S21-006')
for action, role in [('claim', task['role']), ('review', task['reviewer_role'])]:
with self.subTest(action=action):
prompt = runner.prompt({'id': task['id'], 'role': role, 'action': action}, 'auto-preview')
self.assertLessEqual(len(prompt), 80000)
self.assertIn(runner.tracker.packet(task['id'], 'auto-preview'), prompt)
self.assertIn('Required task input reads (not inlined)', prompt)
self.assertIn('Before implementation or review, read these task inputs', prompt)
self.assertIn('a missing required artifact is a blocker', prompt)
for raw in task['inputs']:
self.assertIn(raw, prompt)
if ' (upstream artifact' in raw:
self.assertIn('- ' + raw, prompt)
self.assertNotIn('# File: ' + raw.split(' (')[0] + '\n', prompt)
# Every UI Kit section stays verbatim, including tables and
# unnumbered details beyond the short requirement registry.
spec = (ROOT / 'specs/uikit_clear.md').read_text(encoding='utf-8')
for section in task['ui_sections']:
self.assertIn(runner.tracker.section(spec, section), prompt)
self.assertIn('This is a fresh session.', prompt)
self.assertIn('After submit/approve/reject EXIT.', prompt)
def test_all_current_fresh_agent_prompts_fit_configured_budget(self):
runner = RUN_MODULE.Runner(ROOT, {})
lengths = []
for task in runner.tracker.definitions()['tasks']:
lengths.append(len(runner.prompt({'id': task['id'], 'role': task['role'], 'action': 'claim'}, 'auto-preview')))
for action, role in [('claim', task['role']), ('review', task['reviewer_role'])]:
with self.subTest(task=task['id'], action=action):
lengths.append(len(runner.prompt({'id': task['id'], 'role': role, 'action': action}, 'auto-preview')))
self.assertLessEqual(max(lengths), 80000)
def test_unconfigured_runner_does_not_claim_product_work(self):