Resolve typed-check globs from the target path or refuse unmatched globs at implementation-open #1443
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1443
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A typed required-work check resolves its glob from the project root (ADR-0255). A ticket author who writes a path relative to the target path (for example
lib/os_sdlc/dispatch/brief.rbfor targetplugins/os-sdlc) gets a check that can never pass. Implementation-open accepts the body, so the defect shows only at the suite-check gate, after the red and green rounds. The programmer-repair node cannot change the ticket body, so each repair loop is wasted. The check reads the body snapshot taken at implementation-open, so a correction on the tracker does not help the running implementation.Example: implementation 195 (ticket #1436) escalated with
bound_exhausted:suite-check/fail. The suite-check gate failed 3 times at therequired-workstep:The three checks were
check: absentwork_rootinlib/os_sdlc/dispatch/brief.rb``, and two checks with pathstests/dispatch/brief_map_name_test.rbandtests/dispatch/brief_drafted_map_test.rb. All three files existed at open time underplugins/os-sdlc/. Evidence: implementation 195 escalation 90; the #1436 body revision history.Approach
Refuse at implementation-open, not resolve from the target path: ADR-0255 fixes globs to the project root and the os-backlog validator reads the same check vocabulary, so a second, target-relative path rule would be a silent fallback that changes a one-way door, while a refusal fails loudly before the red round and stays inside the ADR.
Which checks need a file at open:
absentwith a glob that matches no file from the project root: always refuse. Such a check can never pass (ADR-0255: a glob that matches no file fails the check).presentorabsent) whose glob matches no file from the project root but matches a file under the selected target path: refuse, and name the root-relative path<target path>/<glob>.presentwith a glob that matches no file anywhere: accept. The ticket can create that file.TicketShape#missingalready refuses at open for file facts (retired tests not found), so the new refusal joins#missing.Implementation::OpenandImplementation::RerouteIntakeboth raise on#missing, so both get the refusal. They pass the selected target path. An unconfigured project has the target path., so the target-path rule cannot match there. The suite-check gate (RequiredWorkCheck) is unchanged.Required work:
TicketShape::RequiredWork::Checkreturns its open-time problem for a project root and a target path, by the three rules above (proven by AC 1, AC 2).TicketShapetakes atarget_path:keyword (default., the same default asProject::Target) and adds one#missingentry per typed check with a problem (proven by AC 1, AC 2).Implementation::Open#check_ticket_shape!passestarget_path: @project.target.path(proven by AC 2).Implementation::RerouteIntake#refuse_incomplete_shape!passes the same target path (proven by AC 3).Acceptance criteria
poodr-ticket-implementationwithcheck: absentwork_rootinlib/brief.rband no file `lib/brief.rb` under the project root, when implementation-open runs, then it raises `HarnessError` whose message containsabsent check glob matched no file:lib/brief.rb``, and no implementation row exists.plugins/widget, a fileplugins/widget/tests/brief_test.rb, and a body withcheck: presentdef test_briefintests/brief_test.rb, when implementation-open runs, then it raises `HarnessError` whose message containswrite it from the project root asplugins/widget/tests/brief_test.rb``, and no implementation row exists.RerouteIntakeRefusedErrorwhose message names the root-relative path<target path>/<glob>.Owner sketch
OsSdlc::TicketShape::RequiredWork::Check(lib/os_sdlc/ticket_shape/required_work/check.rb)#open_problem(root:, target_path:):nilwhen the glob matches a file fromroot;"glob `<g>` matches only under the target path; write it from the project root as `<t>/<g>`"when it matches only underroot/target_path;"absent check glob matched no file: `<g>`"forabsent;nilforpresent.OsSdlc::TicketShape(lib/os_sdlc/ticket_shape.rb)target_path:keyword;#missingadds"Required work check (<problem>): <item text>"per typed item.OsSdlc::Implementation::Open(lib/os_sdlc/implementation/open.rb)target_path: @project.target.path.OsSdlc::Implementation::RerouteIntake(lib/os_sdlc/implementation/reroute_intake.rb)OsSdlc::Implementation::RequiredWorkCheckTest doubles that stand in for an object whose interface changes: none. No test stubs
TicketShapeorCheck; the tests below use the realProject,Implementation::Open, andTicketShape.FakeTrackerstands in for the tracker, whose interface does not change.Add both tests to
plugins/os-sdlc/tests/implementation/open_ticket_shape_test.rb(classOsSdlc::OpenTicketShapeTest, which already hasTICKET_MAP,body_with_item, andimplementations_for). A scratch spike at HEAD gave 2 failures, bothOsSdlc::HarnessError expected but nothing was raised.In the second test, the project loaded as configured with target pathplugins/widget, so the red is for the intended reason: open accepts the body.Out of scope
presentcheck that names a file the ticket creates with a target-relative path. No file exists at open, so open cannot detect it; it still fails at suite-check.validate-template. It has no project root, the same as for retired tests.Origin
os-sdlc-required-work-check 195during implementation 195 of #1436Work started on branch ticket-1443 via /os-sdlc:implement (poodr-ticket-implementation).
Resolution
Done: implementation-open and reroute refuse a typed required-work check that can never pass: an absent check whose glob matches no file, or a glob that matches only under the target path (the message names the root-relative path). A present check that matches nothing is accepted. GlobFiles is the one owner of glob-to-files matching for open and suite-check.
Evidence: main
5ac83946(merged as2bceeea7). Tests in open_ticket_shape_test (3 new), reroute_target_path_check_test, required_work_typed_check_test. os-sdlc suite 2800 runs, 0 failures. Rubocop clean. Implementation 197 escalated (test defect: fixture map without ticket_shape) and was hand-finished per the escalation procedure, with an opus design audit (no must-fix; should-fix items fixed).Follow-ups: Test-file typed checks (only the test-writer may edit tests): already covered by #865 and #866 per the ticket-skeptic. None else.