Repository navigation
Conversation
…h a reading order A factory that builds faster than a person can read moves the wait to the merge. `syberlabs factory work queue` lists every ticket whose thread holds an accepted change, first to read first. Stacked on claude/factory-plan-claim. Read-only: it appends no event, moves no ref, and pushes, splits and merges nothing. - review_queue.queue orders ready tickets by keys, the first difference decides: the change more tickets wait on (their plans name a path it touches), then fewer files, then the smaller diff, then the one ready longest. Every row carries the keys that placed it. Kind and size are shown and are not keys. - review_queue.reading_order groups the accepted commit's files by component, a component after the ones it depends on (the Space graph's depends_on), so the code that is called is read before the code that calls it. Each group is a layer; files with no component are the last one. - A row names the other ready changes that touch the same files. A change whose commit is not in the repository the queue is read from keeps its row, lists its plan's paths and goes last. - work settle with no ticket records every thread that holds an accepted change, the step before reading the queue. tests/test_factory_review_queue.py, 15 tests; the factory simulation campaign now proposes a patch, accepts it and reads the queue. The order is a rule: it has not been compared with the order a person would choose. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrJ4jU9Q3fnCogMET5bxs
Brings in 42db7a0 and b68cbcb (docs only), through a5e37d9, which b68cbcb repairs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrJ4jU9Q3fnCogMET5bxs
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.
Admission
Class: C
Agent-platform: claude
Reviewed-by: none recorded
Admitted-by: none yet. This adds a module to the subsystem
claude/factory-intakeandclaude/factory-plan-claimpropose, so it waits for the same key and the same first consumerEvidence: tested
Objective
One read-only command for the person who merges:
syberlabs factory work queuelists every ticket whose thread holds an accepted change, first to read first, says what placed each one, and gives a reading order for each change.Stacked on
claude/factory-plan-claim. The base of this pull request is that branch, so the diff shows this packet alone. It is station 7 of Daniel Moka's "Build Your Own Software Factory" (craftbettersoftware.com): people decide the merge, so order what waits for them and cut large changes into layers. A factory that builds faster than a person can read moves the wait to the merge; this does not shorten the reading, it orders it.What changed
syberlabs/factory/review_queue.py(new, read-only)queueordersreadytickets by an ordered list of keys, the first difference decides:blocks: the change more tickets are waiting on. A ticket that is not ready yet waits on a change when its plan names a path the change touches.files: fewer files. Small before large is shortest job first, the order in which the changes behind wait least in total.diff_bytes: the smaller diff.waiting_since: the one ready longest.reading_ordergroups the files of the accepted commit (against the thread's base, not the plan's list) by component and puts a component after the ones it depends on, from the Space graph'sdepends_on. Each group is a layer. Cycles and ties go by name; files with no component are the last layer.syberlabs/factory/work.py:settle_all, andwork settlewith no ticket: record every thread that holds an accepted change, the step before reading the queue.syberlabs/factory/work_cli.py:work queue [--json].tests/test_factory_review_queue.py(15 tests); thefactorysimulation campaign now proposes a patch, accepts it and reads the queue.docs/FACTORY_WORK.md, the station table indocs/FACTORY_INTAKE.md, a row indocs/ROADMAP_STATUS.md.What did not change
queueappends no event.tests/test_factory_review_queue.py::Ordering::test_reading_the_queue_writes_nothingchecks the event count, every ref and the working tree before and after.ledger.KINDS, the schemas, the golden traces, the admission rules, the declared layering.Evidence
Run in a Linux sandbox, CPython 3.13.18, 2 CPUs. The full suite ran at
3049f8c, this change on29f6b98:The one failure is
test_console.ConsoleBrowser.test_the_purchase_order_path_completes_in_a_browser(page.waitForSelector: Timeout 30000ms). It fails the same way onmainat9abce6din this sandbox, so it is not this change.The head,
02c06bc, is the same change moved ontod0a391f(the base branch after a test-only fix) with one test changed to use the default claim time. At the head:27 defects were planted one at a time, 24 in
review_queue.pyand 3 insettle_all(a key's direction flipped, the keys reordered, a dependency edge reversed, the plan's paths listed in place of the commit's). The tests catch each one. The first run left five alive: one showed a redundant check, which was removed; one was equivalent and was replaced; three got tests.Not run here: Windows, CPython 3.11 and 3.12, PostgreSQL.
The branch then merged its base once more (
9a79035, docs only on the base's side);tests.test_gaps,tests.test_factory_review_queue,tests.test_factory_workandtests.test_factory_intake(114 tests) reran at the head.CI on the head,
9a79035: every job is green:teston CPython 3.11, 3.12 and 3.13,windows,compose, G2 to G6, G8 and its strict run,policy, andadmit, the repository's own admission run on the head's exact tree (verdict: acceptable,all_checks_passed, ruleadmission.passed). The browser test that fails in the sandbox is skipped there (playwright for node is not installed, an allowed skip), so CI does not show it passing.Known limitations
blockscounts plans, not conflicts. Two tickets that name the same file may change different functions.readyrecords. A thread accepted and not yet settled is not in the queue untilwork settleruns.Handoff
claude/factory-review-queue, onclaude/factory-plan-claim: the packet's commit and one merge of the base branch.https://claude.ai/code/session_01VHrJ4jU9Q3fnCogMET5bxs
Generated by Claude Code