Repository navigation
feat: plan first when a ticket names code in a critical zone - #85
Merged
Merged
Conversation
BN-4 cost 6.7x plain in the 9abd3c9 run. Its fix touched user data, so wb finish sent it to the standard route after the change was made, and both sessions then reverted a working fix to plan it from scratch. wb start now reads the identifiers the ticket spells (in backticks, snake_case or CamelCase, at most six), finds where each is defined at HEAD, and starts the ticket on the standard route when that file is in a critical zone, saying which name and which zone. When wb finish does move a ticket, it says to keep the change and plan around it, and plan-change says the same. Closing this ticket with wb finish took the standard route for a false reason: the billing zone matches the word plan in any path, so skills/plan-change/SKILL.md read as billing. WB-60 records it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
wb startpredicts a critical zone from the code the ticket names and plans first. Whenwb finishmoves a ticket to the standard route, the change is kept instead of reverted. WB-60 is recorded.Why
WB-58. BN-4 cost 6.7x plain's tokens in the
9abd3c9run for two reasons. Its fix touched user data, andwb finishonly found that out after the change was made. Then both sessions reverted a working fix and planned from scratch.How
light.names()picks identifiers in backticks, snake_case or CamelCase (at most six); plain words are skipped.zone_named()greps their definitions at HEAD (def,class,function) and zones the files.eligible()takes the ticket text.wb startpasses the title and description. A name defined in a zone keeps the ticket off the light path, withlight no: the ticket names display_name, defined in shop/users.py, which is in the user-data zone: plan it first.wb finish's outgrow message says to keep the change on disk and plan around it (citations read HEAD).plan-changesays the same.wb finishhit a false positive: the billing zone matchesplanin any path, soskills/plan-change/SKILL.mdread as billing. The ticket followed the standard route: plan, audit, verify. WB-60 records the zone rule.Verification
wb impl verify WB-58: pass.python -m unittest discover -s tests -q: exit 0python -m ruff check lib: exit 0python -m mypy: exit 0New tests: a bug naming
charge_cardinshop/billing/charge.pystarts on the standard route with the reason; one namingformat_moneykeeps the light path;names()skips plain words; the outgrow message says not to revert.Risk and rollback
Up to twelve
git grepcalls perwb start. Revert to undo;"light_path": falsealso keeps every ticket on the standard route.Open questions