Skip to content

Commit 21834a0

Browse files
committed
feat(demo): set example predictor factors in profiles
Write the outcome-predictor RFC example factors into every demo profiles.yaml so local runs show evidence revising ranking instead of silently staying at neutral 1.
1 parent a97225b commit 21834a0

4 files changed

Lines changed: 32 additions & 1 deletion

File tree

doc/howto/QUICKSTART.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,17 @@ Every change writes all of its files into one folder under `demo/`, and `FOLDERS
7474

7575
Set it deliberately when you want a run to show one thing. `FOLDERS=1` puts every change in the same place, so the queue serializes the lot and each change speculates on the one before it. A number well above `COUNT` keeps them all apart, so they go out together.
7676

77-
How much speculation that turns into is capped by the queue's **build budget** — how many builds it may have occupying CI at once, counted across every in-flight batch rather than per batch. It defaults to 4 and is set per queue in the provider's `profiles.yaml`:
77+
How much speculation that turns into is capped by the queue's **build budget** — how many builds it may have occupying CI at once, counted across every in-flight batch rather than per batch. It defaults to 4 and is set per queue in the provider's `profiles.yaml`. The demo also sets **predictor factors** there so speculation ranking revises the scorer's price when a path passes or fails or a batch is merging or cancelling; omitting that block leaves every factor at `1`, which is a no-op and ranks on the scorer alone.
7878

7979
```yaml
8080
defaults:
8181
speculator: {buildBudget: 4}
82+
predictor:
83+
factors:
84+
pathPassed: 10
85+
pathFailed: 0.3
86+
merging: 12
87+
cancelling: 0.1
8288

8389
queues:
8490
- name: demo-queue

service/submitqueue/demo/provider/fake/profiles.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ defaults:
2222
# 1 the queue explores one path at a time, and raising it lets it hedge more
2323
# of the outcomes it is waiting on. Four is the built-in default.
2424
speculator: {buildBudget: 4}
25+
# Example evidence factors from the outcome-predictor RFC. Omitted keys would
26+
# stay at 1 and ranking would stay on the scorer alone; writing them out makes
27+
# the demo show how path results and batch state revise that price.
28+
predictor:
29+
factors:
30+
pathPassed: 10
31+
pathFailed: 0.3
32+
merging: 12
33+
cancelling: 0.1
2534

2635
queues:
2736
# The queue `make demo-requests` and `make land` use by default.

service/submitqueue/demo/provider/git/profiles.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ defaults:
1212
buildRunner: {type: fake}
1313
# Serialize conservatively unless a queue says otherwise.
1414
analyzer: {type: all}
15+
# Same example factors as ../fake/profiles.yaml — see that file for why they
16+
# are written out rather than left at the neutral default of 1.
17+
predictor:
18+
factors:
19+
pathPassed: 10
20+
pathFailed: 0.3
21+
merging: 12
22+
cancelling: 0.1
1523

1624
queues:
1725
# The queue `make demo-requests` and `make land` use by default. Serializes

service/submitqueue/demo/provider/github/profiles.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ defaults:
1010
changeProvider: {type: fake}
1111
buildRunner: {type: fake}
1212
analyzer: {type: all}
13+
# Same example factors as ../fake/profiles.yaml — see that file for why they
14+
# are written out rather than left at the neutral default of 1.
15+
predictor:
16+
factors:
17+
pathPassed: 10
18+
pathFailed: 0.3
19+
merging: 12
20+
cancelling: 0.1
1321

1422
queues:
1523
- name: demo-queue

0 commit comments

Comments
 (0)