Skip to content

Task slice

bash
php artisan richter:task-slice --base=HEAD~1
php artisan richter:task-slice --base=HEAD~1 --head=HEAD

One document for work in progress. detect-changes answers what does this diff reach; affected-tests answers what should I run. Neither answers what does the work in front of me own — and on a change that touches a shared class, the first answer is most of the application.

The slice answers all three at once, from a single graph walk.

What it emits

FieldAct on it
keptThe entry surfaces this task owns
unreferencedKeptThe kept surfaces no test PROVES — unreferenced, or referenced only by a test with no behavioural assertion the scan recognises
hazardsContract changes on this diff — worst tier first
findingsAdvisory notes about the changed source itself
verificationFalseWhat the risk level graded and did not find verified, including what it could not check
runImpact / runImpactOnTrue when the diff changed something but owns no entry surface. Run impact on each class instead of concluding it reaches nothing
affectedTests / affectedFrontendTestsThe test selection, unchanged from affected-tests
affectedTestsDeterminable / affectedTestsReasonsfalse means run the full suite
droppedHubCountHow many surfaces folded as hub reach. A count to read, not a list to open
entryPointCountHow many the diff reaches in total
risk / riskCause / unresolved / lowConfidenceUnchanged from detect-changes

Two promises

The test selection is never narrowed. A hub list cannot remove a test from affectedTests. What it can do is set affectedTestsDeterminable to false: the selection was computed for the whole diff, so once the keep set folds surfaces away it is no longer complete for what the slice reports. That is strictly more conservative, and it is the only direction this command will ever move a test decision.

Nothing here grades the change. risk, the gate and the selection never read the hub list. It is a project's policy about its own layout, not evidence about its code.

Configuring hubs

Without richter.task_slice hub paths, nothing folds: kept is every surface the diff reaches and droppedHubCount is 0. See Which rows are this task's for the keep rule and why richter ships no default list.

Exit codes

0 on success, 1 when the run failed. The test decision is inside the document, not in the exit code — read affectedTestsDeterminable. Stdout is always one JSON document, errors included, so an agent never has to tell a report from a failure by its shape.