| name | frontier-sim |
| description | Simulate deterministic frontier scheduling for a set of URLs and seeds. Use to verify ordering, politeness, and priority behavior without performing actual fetches. |
| version | 0.1.0 |
| user-invocable | true |
| allowed-tools | Bash(cargo *) Read Write Glob |
| argument-hint | [seed] [num-urls] |
Frontier Simulation
Dry-run the frontier scheduler to visualize and verify ordering behavior.
Parameters
- Seed:
$0 (default: 42)
- Number of URLs:
$1 (default: 100)
Procedure
-
Generate or load a URL set (use test fixtures or generate synthetic URLs spanning multiple domains).
-
Initialize the frontier with the given seed.
-
Dequeue all URLs and record the ordering.
-
Verify properties:
- Determinism: Same seed always produces same order
- Politeness: No two consecutive URLs share the same host (within politeness window)
- Priority: Higher-priority URLs (by depth, by seed ranking) appear earlier
- Completeness: All URLs are dequeued exactly once
-
Output a visualization:
Frontier Simulation (seed=42, n=100)
=====================================
#001 example.com/page-a depth=0 priority=1.00
#002 other.org/index depth=0 priority=0.98
#003 example.com/page-b depth=1 priority=0.95
...
Politeness violations: 0
Priority inversions: 0
Coverage: 100/100
Determinism: VERIFIED (2 runs matched)
- If any violations are found, trace back to the scheduling decision and identify the root cause.