Repository navigation
spec(port): port specs/port/trios-railway/crates/trios-igla-race/src/bin/debug_queue.t27 (Closes #9704) - #10015
Open
dmitrii-f-t27 wants to merge 1 commit into
Open
dmitrii-f-t27 wants to merge 1 commit into
dmitrii-f-t27 wants to merge 1 commit into
Conversation
…bin/debug_queue.t27 (Closes gHashTag#9704) Port gHashTag/trios-railway:crates/trios-igla-race/src/bin/debug_queue.rs (at 46ea51e585ee, 53 lines) as specs/port/trios-railway/crates/ trios-igla-race/src/bin/debug_queue.t27 - Roadmap Stage 6, goal gHashTag#4548, target t27c gen-rust. The queue inspector's decisions are ported as pure functions and tested (7 tests, 7 pass, 0 vacuous, 32 runtime asserts, 100% function coverage): the L-NEON-RENAME URL resolution (a present, non-empty --neon-url flag wins, an absent or empty flag falls back to the legacy NEON_DATABASE_URL, neither is the missing-URL error), the pending listing shape (at most 10 rows, LIMIT 10), the listing order (priority DESC, then id ASC), the pending filter, the stale-running reset (a claim of more than 30 minutes; exactly 30 is not yet stale - the SQL is a strict <), the bogus-done reset (a done row whose final_step is present and 0; NULL never matches), and main's URL gate (exit 1 before any queue work when no URL resolves, else 0 after the listing and both resets). The Postgres connection, raw_query and raw_execute are the callers' plumbing. Verified: parse OK, spec-status IMPLEMENTED, typecheck 0 errors, coverage 7/7, test-report 7/7 pass, 0 BLOCKED, gen 117 lines with 0 'not yet implemented', boundary exactly this one file, dupe_scan: all 7 function names unique across 2059 specs, bare body scan 722/217 unchanged (no new group, none grew). Dmitrii Fedorov ([@dmitrii-f-t27](https://github.com/dmitrii-f-t27))
Contributor
Author
|
@gHashTag Please merge this PR into master via the golden chain — rights on gHashTag/t27 are read-only for me (403), so only you can merge it. Verification of this head (d286bb4):
After the merge I will: verify the spec file live on the merge SHA, confirm #9704 auto-closed, and file the 14-step report. Dmitrii Fedorov (@dmitrii-f-t27) |
This was referenced Oct 17, 2026
Merged
Merged
Merged
spec(policy): l2_generation -- gen/json/ is t27c gen-json's backend directory (Closes #10079)
#10082
Merged
This was referenced Oct 18, 2026
Merged
Merged
Merged
Merged
spec(t27f): token_floor -- an infographic where every particle carries a fact (Closes #10323)
#10325
Merged
Merged
Closed
Merged
Merged
Merged
This branch has not been deployed
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.
Summary
Port
gHashTag/trios-railway:crates/trios-igla-race/src/bin/debug_queue.rs(at46ea51e585ee, 53 lines) asspecs/port/trios-railway/crates/trios-igla-race/src/bin/debug_queue.t27— Roadmap Stage 6 (goal #4548), target t27c gen-rust. Closes #9704.The original is the queue inspector CLI: it resolves the Postgres URL, lists up to ten pending experiments, then resets stale running rows and bogus done rows.
Per the issue's rule ("Port the decision, not the plumbing"), the one listed function is ported under its name as a pure function (no transports — the Postgres connection,
raw_queryandraw_executeare the callers' plumbing) with 7 tests (32 runtime asserts, 0 vacuous, 100% function coverage):--neon-urlflag wins; an absent or empty flag falls back to the legacyNEON_DATABASE_URL; when neither holds a URL the run dies withRAILWAY_POSTGRES_URL (or legacy NEON_DATABASE_URL) not set;LIMIT 10), of every count the smaller of the two;priority DESC, thenid ASC— a tie on priority is broken by the smaller id;pendingrows enter the listing;<;final_stepis present and 0 is reset — SQLfinal_step=0never matches NULL, so a done row without a final step is kept;main's URL gate (line 14): exit 1 before any queue work when no URL resolves, else 0 after the listing and both resets.Verification (all run live from the worktree root, zig 0.16.0)
t27c parse: OK.t27c spec-status: IMPLEMENTED.t27c typecheck: 0 errors, 0 warnings.t27c coverage: 7/7 tested (100%) — no transports in this port.t27c test-report: 7 tests / 7 pass / 0 FAIL / 0 BLOCKED, 0 vacuous passes — the URL resolution all three ways, main's gate at each source, the LIMIT-10 shape below/at/beyond the limit, the order both ways plus the id tie-break and equal keys, the stale threshold at 29/30/31 minutes, and the bogus filter with and without a present final step.t27c gen | grep -c 'not yet implemented': 0;gen | wc -l: 117 (> 12).grep -cE '^\s*(pub )?fn (main)\(': 1.grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])': 7 (≥ 1).git status --short— exactly this one file. The repo's lefthook pre-commit passed.dupe_scan: all 7 function names unique across 2059 specs (checked before the commit); the bare body scan adds no duplicate group (722 bodies / 217 groups on base, identical with this spec present).Dmitrii Fedorov (@dmitrii-f-t27)