007af498b8
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 17s
CI / helm (pull_request) Successful in 33s
CI / lint (pull_request) Successful in 3m42s
CI / security (pull_request) Successful in 4m8s
CI / quality (pull_request) Successful in 4m9s
CI / typecheck (pull_request) Successful in 4m20s
CI / integration_tests (pull_request) Successful in 7m2s
CI / unit_tests (pull_request) Successful in 7m55s
CI / docker (pull_request) Successful in 1m19s
CI / coverage (pull_request) Successful in 8m46s
CI / e2e_tests (pull_request) Successful in 16m1s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 17s
CI / helm (push) Successful in 22s
CI / quality (push) Successful in 31s
CI / lint (push) Successful in 3m28s
CI / typecheck (push) Successful in 3m54s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m5s
CI / integration_tests (push) Successful in 6m13s
CI / unit_tests (push) Successful in 6m28s
CI / docker (push) Successful in 1m34s
CI / coverage (push) Successful in 12m5s
CI / e2e_tests (push) Successful in 18m47s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 28m0s
CI / benchmark-regression (pull_request) Successful in 59m48s
Renamed all 11 task-type confidence threshold fields in AutomationProfile from phase-transition semantics to spec-defined task-type semantics. Updated all 8 built-in profiles, CLI formatting, YAML schema, services, and all Behave/Robot tests referencing the old field names. Post-review fixes: - Fixed 24 stale old field names in M6 fixture files (automation_profiles.json, autonomy_guardrails.json) - Added model_validator(mode='before') to detect legacy field names and raise actionable ValueError with rename mapping - Added semantic bridge comments in PlanLifecycleService mapping task-type thresholds to phase-transition gates - Added threshold_field to structured log messages for observability - Restored categorised CLI automation-profile show output to match spec (Phase Transitions / Decision Automation / Self-Repair / Execution Controls) instead of flat list - Added missing access_network field to spec show output examples (Rich, Plain, JSON, YAML variants) - Aligned ADR-017 profile fields table to all 11 fields with descriptions matching spec Automatable Tasks table - Aligned automation_profiles.md threshold descriptions with spec - Added spec section references in phase_reversion.md, error_recovery.md, and plan_execute.md for field naming context - Extended repository roundtrip test to assert all 11 threshold fields - Fixed benchmark _make_profile() passing safety fields as top-level kwargs instead of via SafetyProfile sub-model (incompatible with extra="forbid") - Aligned CLI JSON/YAML output structure for automation-profile show with the specification grouped format (phase_transitions, decision_automation, self_repair, execution_controls) - Moved safety boolean fields into the Execution Controls section of Rich output per spec examples - Reverted auto profile description to "Fully automatic except apply" per specification (line 16703, line 28406) - Improved bridge comments in test steps with semantic context for threshold-to-gate mappings ISSUES CLOSED: #902
84 lines
4.9 KiB
Gherkin
84 lines
4.9 KiB
Gherkin
@wf03 @plan_prompt @confidence
|
|
Feature: WF03 plan prompt and confidence-threshold pausing verification
|
|
As a cautious-profile user
|
|
I want confidence-threshold pausing to halt plan execution when confidence is low
|
|
So that I can provide guidance via plan prompt before the system proceeds
|
|
|
|
# --------------------------------------------------------------------------
|
|
# AC1: plan prompt exercises -- verifying the A2A facade path (S15822)
|
|
# --------------------------------------------------------------------------
|
|
|
|
Scenario: Plan prompt via facade injects guidance and returns stub response
|
|
Given a plan prompt facade with no services
|
|
When I dispatch plan prompt for plan "PLAN-WF03-001" with guidance "Use separate models/ directory"
|
|
Then the plan prompt response status should be "guidance_injected"
|
|
And the plan prompt response should contain the plan id "PLAN-WF03-001"
|
|
And the plan prompt response should echo the guidance "Use separate models/ directory"
|
|
# TODO(#885): Verify guidance_added.scope, state_transition, decision_created.type per S15894-15913
|
|
|
|
Scenario: Plan prompt via facade with minimal guidance returns stub response
|
|
Given a plan prompt facade with no services
|
|
When I dispatch plan prompt for plan "PLAN-WF03-002" with guidance "ok"
|
|
Then the plan prompt response status should be "guidance_injected"
|
|
And the plan prompt response should contain the plan id "PLAN-WF03-002"
|
|
And the plan prompt response should echo the guidance "ok"
|
|
|
|
Scenario: Plan prompt via facade with empty guidance
|
|
Given a plan prompt facade with no services
|
|
When I dispatch plan prompt for plan "PLAN-WF03-003" with empty guidance
|
|
Then the plan prompt response status should be "guidance_injected"
|
|
And the plan prompt response should contain the plan id "PLAN-WF03-003"
|
|
And the plan prompt response should echo empty guidance
|
|
|
|
# --------------------------------------------------------------------------
|
|
# AC2: Confidence-threshold pausing with cautious profile (S37262-37367)
|
|
# --------------------------------------------------------------------------
|
|
|
|
Scenario: Cautious profile pauses on low-confidence strategy decision
|
|
Given a default autonomy controller
|
|
And the automation profile "cautious"
|
|
And the cautious edit_code threshold should be 0.6
|
|
When I evaluate escalation for operation "edit_code" with confidence factors past_success_rate 0.4 codebase_familiarity 0.5 risk_assessment 0.6 invariant_complexity 0.5
|
|
Then the escalation decision proceed should be false
|
|
And the escalation confidence should be below the cautious threshold 0.6
|
|
|
|
Scenario: Cautious profile proceeds on high-confidence strategy decision
|
|
Given a default autonomy controller
|
|
And the automation profile "cautious"
|
|
When I evaluate escalation for operation "edit_code" with confidence factors past_success_rate 0.9 codebase_familiarity 0.8 risk_assessment 0.1 invariant_complexity 0.1
|
|
Then the escalation decision proceed should be true
|
|
And the escalation confidence should be at or above the cautious threshold 0.6
|
|
|
|
Scenario: Cautious profile pauses when confidence equals 0.55 for strategy decisions
|
|
Given a default autonomy controller
|
|
And the automation profile "cautious"
|
|
When I evaluate escalation for operation "edit_code" with factors producing confidence 0.55
|
|
Then the escalation decision proceed should be false
|
|
And the decision explanation should mention threshold
|
|
|
|
Scenario: Cautious profile proceeds when confidence equals 0.6 exactly for strategy decisions
|
|
Given a default autonomy controller
|
|
And the automation profile "cautious"
|
|
When I evaluate escalation for operation "edit_code" with factors producing confidence 0.6
|
|
Then the escalation decision proceed should be true
|
|
|
|
# --------------------------------------------------------------------------
|
|
# AC2+: Full pause-and-resume flow (S37262-37367)
|
|
# NOTE: Full causal resume testing (guidance -> re-evaluation) requires
|
|
# the wired actor/provider stack from #885. This scenario establishes
|
|
# a logical connection via plan_id but cannot prove causality yet.
|
|
# --------------------------------------------------------------------------
|
|
|
|
Scenario: WF03 full pause-and-resume flow with cautious profile
|
|
Given a default autonomy controller
|
|
And the automation profile "cautious"
|
|
And a decision seeded with confidence 0.55 for operation "edit_code"
|
|
When I check whether the system should proceed automatically
|
|
Then the escalation decision proceed should be false
|
|
And the decision explanation should mention escalation to user
|
|
When I provide plan prompt guidance "Use separate models/ directory" for the paused plan
|
|
Then the guidance should be recorded as a user intervention
|
|
And the guidance response plan id should match the paused decision context
|
|
When I re-evaluate with corrected confidence 0.85 for operation "edit_code"
|
|
Then the escalation decision proceed should be true
|