Skip to content

chore: constrain local Test to scenario-driven evidence - #6

Merged
davidtandoh merged 2 commits into
mainfrom
fm/ak088-test-guidance
Sep 17, 2026
Merged

davidtandoh merged 2 commits into
mainfrom
fm/ak088-test-guidance

Conversation

@davidtandoh

Copy link
Copy Markdown
Owner

Intent

Approve the separate test-guidance PR and its merge after review and passing checks, so upstream sync can resume. Use scenario-driven, bounded foreground Test evidence instead of a local family/full-suite walk. Preserve test.evidence, all required gates, the existing 30-minute deadline, and the absence of commands.test. Keep broad regression and hosted CI mandatory. No global configuration or daemon change, and no merge of the upstream-sync PR itself.

What Changed

  • Added a test.instructions block to .no-mistakes.yaml that directs the local Test step to derive scenarios from the intent and integrated diff, drive each with the smallest existing executable test in a separate foreground invocation, and skip any family or full-suite walk. It names a bounded bin/fm-test-run.sh tests/fm-task-delivery.test.sh invocation (--jobs 1, 90-second per-script timeout, 120-second wall limit, JSON timing output) as the starting point for worker delivery-contract changes.
  • The instructions also set evidence rules: retain complete output and timing artifacts, treat a timed-out script as incomplete evidence, do not background tests or use head/tail output as a verdict, distinguish isolated-fixture coverage from real remote acceptance, mark unavailable live scenarios untested with a reason, and keep broad regression and hosted CI mandatory. test.evidence.store_in_repo: true is unchanged and no commands.test is added.
  • Documented the new test.instructions gate default in docs/configuration.md, pointing to .no-mistakes.yaml as the owner of the exact wording.

Risk Assessment

✅ Low: The change adds only a 15-line test.instructions prose block to .no-mistakes.yaml; test.evidence.store_in_repo, commands.lint, disable_project_settings and the absence of commands.test are preserved, no deadline/global/daemon setting is touched, and the example fm-test-run.sh invocation uses flags and positional-script parsing that exist in the runner.

Testing

I ran three separate bounded foreground runs of bin/fm-test-run.sh and kept the full logs and timing artifacts; no baseline commands, family walk or full-suite walk ran. First, the guidance's delivery-contract command ran verbatim: it exited 0 in about 18.5s against a 120s budget, and its JSON artifact carried the exit and gate_skip fields. Second, the existing commands.test contract test passed against the changed config, and a parsed config dump showed test.evidence and all other keys preserved. Third, an adversarial 2-second timeout produced exit 124 and a non-zero runner exit, not a false pass. Delivery of the instructions into a real Test prompt was not driven because this phase may not start or control a pipeline. Hosted CI still owns broad regression.

  • Live validation: ✅ go - 3 of 5 scenarios driven live against the product
Scenario Result Live Evidence
A Test agent runs the guidance's delivery-contract command verbatim and gets a bounded foreground run plus a timing artifact with exit and gate-skip fields ✅ pass live delivery-run.log and delivery-timing.json: script exit=0, gate_skip=false, duration 18556ms against max_wall_ms=120000
Adversarial: a script that exceeds its per-script timeout is reported as incomplete evidence (exit 124, runner non-zero), not as a pass ✅ pass live timeout-adversarial-run.log and timeout-adversarial-timing.json: script exit=124, summary failed=1, runner exit 1
The changed .no-mistakes.yaml parses, keeps commands.test absent, and preserves test.evidence, commands.lint and disable_project_settings, with no timeout or deadline key added ✅ pass live nm-contract-run.log (ok - no-mistakes does not configure commands.test) and config-semantic-model.json
no-mistakes delivers the new test.instructions into a real Test-step prompt, and that agent then avoids family and full-suite walks ⏸️ untested no Proving this needs a fresh no-mistakes pipeline run with this file on the trusted default branch. This gate phase is forbidden from starting or controlling a pipeline (init, run, rerun). To prove it,…
Hosted CI and broad regression stay mandatory for delivery, and the 30-minute Test deadline is unchanged ⏸️ untested no The Test phase may not run the push, PR or CI phases. The 30-minute deadline lives in daemon or global configuration outside this worktree, and this change may not touch it. The outer executor's CI st…
Evidence: Delivery-contract command transcript

Source: Delivery-contract command transcript

FM_TEST_BEGIN 2026-09-17T08:54:00Z tests/fm-task-delivery.test.sh family=pure-contract-unit expected_gate_skip=none
ok - fm-spawn/fm-promote: authorized intent preserves exact words and refuses operator-address lines
ok - fm-spawn: every legacy worker receives scoped role instructions without changing project or primary instructions
ok - fm-spawn: a ship spawn requires a valid explicit mode and yolo before anything is created
ok - fm-spawn: scout and secondmate spawns refuse ship delivery flags
ok - fm-spawn: the brief's recorded mode and the spawn's explicit mode must agree
ok - fm-spawn: a rigor downgrade against the registered posture is announced, never blocked
ok - fm-spawn: a scout spawn resolves no delivery posture from the registry
ok - fm-promote: promotion requires the delivery contract and records it exactly once
ok - fm-promote: a symlinked task record is refused and its target is left untouched
ok - fm-promote: a promoted worker receives the same mode-specific delivery contract a briefed one does
ok - fm-project-mode: the conditional policy is accepted, mapped for mechanical callers, and readable raw
ok - fm-spawn/fm-promote: leftover Task placeholders are refused until both subsections are filled
# all fm-task-delivery tests passed
FM_TEST_END 2026-09-17T08:54:18Z tests/fm-task-delivery.test.sh exit=0 duration_ms=18507 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=18556
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=1 duration_ms=18507 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-task-delivery.test.sh duration_ms=18507
fm-test-run: wrote timing artifact: ~/.no-mistakes/evidence/01M2Q93MFSA8EZRGQWR18ZN763/delivery-timing.json
FM_TEST_BUDGET max_wall_ms=120000 duration_ms=18556
Evidence: Delivery timing artifact (exit and gate-skip fields)

Source: Delivery timing artifact (exit and gate-skip fields)

{
  "families": [
    {
      "count": 1,
      "duration_ms": 18507,
      "failed": 0,
      "name": "pure-contract-unit"
    }
  ],
  "finished_at": "2026-09-17T08:54:18Z",
  "run_id": "fm-test-run-1789635240315-69031",
  "scripts": [
    {
      "duration_ms": 18507,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-task-delivery.test.sh"
    }
  ],
  "selection": "scripts;jobs=1",
  "started_at": "2026-09-17T08:54:00Z",
  "summary": {
    "duration_ms": 18556,
    "failed": 0,
    "skipped_gate": 0,
    "total": 1
  }
}
Evidence: commands.test contract test transcript

Source: commands.test contract test transcript

FM_TEST_BEGIN 2026-09-17T08:54:24Z tests/fm-nm-test-contract.test.sh family=unclassified expected_gate_skip=none
ok - no-mistakes does not configure commands.test
FM_TEST_END 2026-09-17T08:54:25Z tests/fm-nm-test-contract.test.sh exit=0 duration_ms=152 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=197
FM_TEST_SUMMARY_FAMILY family=unclassified count=1 duration_ms=152 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-nm-test-contract.test.sh duration_ms=152
fm-test-run: wrote timing artifact: ~/.no-mistakes/evidence/01M2Q93MFSA8EZRGQWR18ZN763/nm-contract-timing.json
FM_TEST_BUDGET max_wall_ms=120000 duration_ms=197
Evidence: commands.test contract timing artifact

Source: commands.test contract timing artifact

{
  "families": [
    {
      "count": 1,
      "duration_ms": 152,
      "failed": 0,
      "name": "unclassified"
    }
  ],
  "finished_at": "2026-09-17T08:54:25Z",
  "run_id": "fm-test-run-1789635264863-94725",
  "scripts": [
    {
      "duration_ms": 152,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "unclassified",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-nm-test-contract.test.sh"
    }
  ],
  "selection": "scripts;jobs=1",
  "started_at": "2026-09-17T08:54:24Z",
  "summary": {
    "duration_ms": 197,
    "failed": 0,
    "skipped_gate": 0,
    "total": 1
  }
}
Evidence: Parsed .no-mistakes.yaml semantic model

Source: Parsed .no-mistakes.yaml semantic model

commands: {lint: bin/fm-lint.sh}; test.evidence: {store_in_repo: true}; test.instructions: 14 lines; disable_project_settings: true; top-level keys: disable_project_settings, document, commands, test

{
  "commands": {
    "lint": "bin/fm-lint.sh"
  },
  "test.evidence": {
    "store_in_repo": true
  },
  "test.instructions_lines": 14,
  "disable_project_settings": true,
  "top_keys": [
    "disable_project_settings",
    "document",
    "commands",
    "test"
  ]
}
Evidence: Adversarial timeout transcript

Source: Adversarial timeout transcript

FM_TEST_END tests/fm-task-delivery.test.sh exit=124 duration_ms=2388 gate_skip=false FM_TEST_SUMMARY total=1 failed=1 skipped_gate=0 duration_ms=2475 runner exit=1

FM_TEST_BEGIN 2026-09-17T08:54:31Z tests/fm-task-delivery.test.sh family=pure-contract-unit expected_gate_skip=none
not ok - tests/fm-task-delivery.test.sh exceeded the per-script bound of 2s and was terminated
FM_TEST_END 2026-09-17T08:54:34Z tests/fm-task-delivery.test.sh exit=124 duration_ms=2388 gate_skip=false
FM_TEST_SUMMARY total=1 failed=1 skipped_gate=0 duration_ms=2475
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=1 duration_ms=2388 failed=1
FM_TEST_SLOWEST rank=1 script=tests/fm-task-delivery.test.sh duration_ms=2388
fm-test-run: wrote timing artifact: ~/.no-mistakes/evidence/01M2Q93MFSA8EZRGQWR18ZN763/timeout-adversarial-timing.json
FM_TEST_BUDGET max_wall_ms=120000 duration_ms=2475
Evidence: Adversarial timeout timing artifact

Source: Adversarial timeout timing artifact

{
  "families": [
    {
      "count": 1,
      "duration_ms": 2388,
      "failed": 1,
      "name": "pure-contract-unit"
    }
  ],
  "finished_at": "2026-09-17T08:54:34Z",
  "run_id": "fm-test-run-1789635271810-94859",
  "scripts": [
    {
      "duration_ms": 2388,
      "exit": 124,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-task-delivery.test.sh"
    }
  ],
  "selection": "scripts;jobs=1",
  "started_at": "2026-09-17T08:54:31Z",
  "summary": {
    "duration_ms": 2475,
    "failed": 1,
    "skipped_gate": 0,
    "total": 1
  }
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ docs/configuration.md:217 - docs/configuration.md describes the tracked .no-mistakes.yaml as setting test.evidence.store_in_repo and commands.lint only; it does not mention the new trusted test.instructions block. The YAML itself is the authoritative owner and the pipeline's Document step can decide whether a one-line pointer is warranted, so no review-phase action is needed.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 3 of 5 scenarios driven live against the product
Scenario Result Live Evidence
A Test agent runs the guidance's delivery-contract command verbatim and gets a bounded foreground run plus a timing artifact with exit and gate-skip fields ✅ pass live delivery-run.log and delivery-timing.json: script exit=0, gate_skip=false, duration 18556ms against max_wall_ms=120000
Adversarial: a script that exceeds its per-script timeout is reported as incomplete evidence (exit 124, runner non-zero), not as a pass ✅ pass live timeout-adversarial-run.log and timeout-adversarial-timing.json: script exit=124, summary failed=1, runner exit 1
The changed .no-mistakes.yaml parses, keeps commands.test absent, and preserves test.evidence, commands.lint and disable_project_settings, with no timeout or deadline key added ✅ pass live nm-contract-run.log (ok - no-mistakes does not configure commands.test) and config-semantic-model.json
no-mistakes delivers the new test.instructions into a real Test-step prompt, and that agent then avoids family and full-suite walks ⏸️ untested no Proving this needs a fresh no-mistakes pipeline run with this file on the trusted default branch. This gate phase is forbidden from starting or controlling a pipeline (init, run, rerun). To prove it,…
Hosted CI and broad regression stay mandatory for delivery, and the 30-minute Test deadline is unchanged ⏸️ untested no The Test phase may not run the push, PR or CI phases. The 30-minute deadline lives in daemon or global configuration outside this worktree, and this change may not touch it. The outer executor's CI st…
  • bin/fm-test-run.sh tests/fm-task-delivery.test.sh --jobs 1 --per-script-timeout-secs 90 --max-wall-ms 120000 --json <evidence>/delivery-timing.json (foreground, exit 0)
  • bin/fm-test-run.sh tests/fm-nm-test-contract.test.sh --jobs 1 --per-script-timeout-secs 90 --max-wall-ms 120000 --json <evidence>/nm-contract-timing.json (foreground, exit 0)
  • bin/fm-test-run.sh tests/fm-task-delivery.test.sh --jobs 1 --per-script-timeout-secs 2 --max-wall-ms 120000 --json <evidence>/timeout-adversarial-timing.json (adversarial; runner exit 1 with script exit 124, as expected)
  • ruby -ryaml parse of .no-mistakes.yaml into a semantic model, written to config-semantic-model.json
  • git status --short after testing (worktree clean)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Add the reviewed foreground Test guidance to the existing test mapping.
Preserve evidence publication and all other configuration settings.
Keep broad regression in hosted CI.
@davidtandoh
davidtandoh merged commit a217ce0 into main Sep 17, 2026
14 checks passed
davidtandoh added a commit that referenced this pull request Sep 27, 2026
Bring fork main (2f9a106, the 2026-09-26 upstream sync plus fork
fixes #2-#6) into the Kiro V3 crew branch so PR #8 merges cleanly.
A merge, not a rebase, keeps the upstream PR kunchenguid#4679 merge and its
authorship intact.

Textual conflicts (1):

- bin/fm-test-run.sh, family_for_basename live-e2e list: this branch
  added fm-kiro-signals-live-e2e.test.sh on its own line; main added
  fm-herdr-agent-liveness-live-e2e.test.sh beside the version-floor
  test. Kept both entries, so both live tests stay classified in the
  live-harness-optin family.

Auto-merged files touched by both sides, checked by hand:

- bin/fm-spawn.sh: main's agy Opus --effort omission (fork fix #5)
  sits in the agy arm next to this branch's new kiro effort arm;
  effort_flag_for_harness keeps the (harness, effort, model)
  signature on both sides.
- agy.md, docs/configuration.md, docs/verification/runtime-backends.md:
  disjoint hunks.

Semantic review: the Kiro adapter adds no arm to bin/backends/herdr.sh
or fm_harness_pid_alive. Kiro reaches the fork's registration-
independent Herdr liveness (fork fix #3) through
fm_agent_process_classify_name, where kiro-cli classifies as agent.
It is worker-only, so it stays out of the primary session-lock
harness table.

Claude-Session: https://claude.ai/code/session_01B4Krq5gHjEPXbmzMaaeTHs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant