the life cycle of a target and the long tail · lesson 3 of 9 · sources checked 2026-11-22
onboard and accept
This lesson builds the extractor and the oracle rule of a new target, and accepts the target in a written window before the charge starts.
status of this lesson: from my practicepurpose
An extractor that works on the first day can fail on the second day, or it can give wrong data that looks correct. When the customer pays from the first day, each of these faults becomes a cost and a dispute. An acceptance window before the charge shows the faults while they are still cheap.
objectives
- Write an oracle rule and its test from the reconnaissance report.
- Explain why a canary must show changes in two directions.
- Apply a written acceptance rule to the results of an acceptance window.
- Name the parts of an acceptance record.
new terms
- acceptance window
- A fixed period in which a new target must meet a written acceptance rule before the charge to the customer starts.
how it works
The onboard step makes the code for one target. The accept step then tests the code, so that a fault shows before the customer pays for the data. Both steps use the reconnaissance report of The reconnaissance report.
the extractor and the oracle rule
The extractor reads the fields of the request from the pages or the data interfaces that the report names. For example, it reads the title and the date of each event from one JSON interface.
The success oracle decides if one attempt got the real content. Its rule comes from the report. For example: "status 200, and the response holds a list of events with a title and a date in each item".
The rule has its own test. The test gives the oracle a stored good page and a stored bad page, and it checks both results.
Without a rule for the target, the result of each attempt stays unknown. A generic render floor can then give the verdict. Then the record states the risk of a false pass: a pass on a page that does not hold the real content.
two directions of change
A canary is a small check at a fixed interval. It shows a change of the outcome over time. A change can go in two directions:
- A pass becomes a fail. The extractor or the oracle stops to work on a good page.
- A fail becomes a false pass. For example, the site sends a block page with the status 200, and the oracle reads it as a pass.
A canary that sees one direction only misses the other. Thus the design has two canaries.
The good canary sends a known good page of the target to the oracle, and the oracle must give pass. The bad canary sends a stored bad page from the lab, and the oracle must give fail. The bad canary sends no request to the site.
The oracle verdicts on the records of each day are a second view. For example, the good canary gives pass, but the records of the day fail. Then the site can give the canary a special treatment.
the acceptance window
In my practice, each new target goes through an acceptance window with a written acceptance rule. The window is 1 to 4 weeks. The charge to the customer starts only after the acceptance record.
the acceptance rule
The operator writes the acceptance rule before the window starts, so that a result cannot change it. For example, an acceptance rule has three conditions:
- The window has the minimum count of days of the rule.
- On each day, the pass share of the oracle is at or above the floor of the rule.
- On each day, the good canary gives pass, and the bad canary gives fail.
A day that does not meet a condition gives a reason. The target then goes back to the onboard step, and a new window starts after the repair.
the acceptance record
The acceptance record closes the window. It holds five parts:
- The version of the extractor.
- The oracle rule and its test.
- The two canaries.
- The written acceptance rule.
- The result of each day, and the decision.
For example, one record names extractor version 3, a window of 14 days, and the decision "accepted".
The record is the start point of the charge. The billed unit and the success rule of the charge are in The billable unit and the success rule (not yet published). The quote of the work comes from the intake step.
the two sides
| automation side | detection side |
|---|---|
| Acceptance shows that the extractor and the oracle work on the target before the customer pays. A canary that sees only one direction of change misses a false pass. | The good canary sends a small request at a fixed interval. A defender can see the interval. A canary that a defender recognizes measures a special treatment, not the real outcome. |
design decisions
| option | gain | cost | when it is correct |
|---|---|---|---|
| A written window before the charge | The customer pays only for a target that works. | The charge starts later. | For each new target |
| An acceptance rule that is written before the window | No result can change the rule. | A rule that is too strict can stop a good target. | Always |
| A good canary and a bad canary | Both directions of change are visible. | Two checks to keep current | For each target |
| A bad canary from a stored page | No extra request to the site | The stored page can become old. | When the lab holds a bad page of the target |
| A generic render floor with a stated risk | A verdict for a target with no own rule | A false pass on a page that is not the real content | Only until the target has its own rule |
diagram
the acceptance window: two canaries, the acceptance rule, and the start of the charge
code example
The example checks two synthetic acceptance windows. They are not the window of the exercise. The two values of the acceptance rule are example values.
Apply a written acceptance rule to the oracle results and the two canary results of an acceptance window, with synthetic days.
// Acceptance check over the days of an acceptance window. All values are synthetic.
// Each day has the pass share of the success oracle on the records of the day,
// and the verdicts of two canaries:
// - the good canary: a known good page of the target that must pass;
// - the bad canary: a stored bad page, for example a block page, that must fail.
// A good canary that fails shows a pass that became a fail.
// A bad canary that passes shows a false pass.
type Verdict = "pass" | "fail";
type Day = { day: number; oraclePassShare: number; goodCanary: Verdict; badCanary: Verdict };
type Window = { target: string; days: Day[] };
// The written acceptance rule. The values are example values.
const MIN_DAYS = 14;
const MIN_PASS_SHARE = 0.95;
function check(w: Window): { target: string; accepted: boolean; days: number; reasons: string[] } {
const reasons: string[] = [];
if (w.days.length < MIN_DAYS) reasons.push(`window has ${w.days.length} days, the rule asks for ${MIN_DAYS}`);
for (const d of w.days) {
if (d.oraclePassShare < MIN_PASS_SHARE)
reasons.push(`day ${d.day}: pass share ${d.oraclePassShare} is below ${MIN_PASS_SHARE}`);
if (d.goodCanary !== "pass") reasons.push(`day ${d.day}: good canary failed (a pass became a fail)`);
if (d.badCanary !== "fail") reasons.push(`day ${d.day}: bad canary passed (a false pass)`);
}
return { target: w.target, accepted: reasons.length === 0, days: w.days.length, reasons };
}
// Make a window of synthetic days. Each day passes, except the days in "faults".
function makeWindow(target: string, count: number, faults: Record<number, Partial<Day>>): Window {
const days: Day[] = [];
for (let day = 1; day <= count; day++) {
days.push({ day, oraclePassShare: 0.97, goodCanary: "pass", badCanary: "fail", ...faults[day] });
}
return { target, days };
}
const windows: Window[] = [
makeWindow("lab-target-a", 14, {}),
makeWindow("lab-target-b", 12, { 5: { goodCanary: "fail" }, 8: { oraclePassShare: 0.91 } }),
];
for (const w of windows) {
const r = check(w);
console.log(`${r.target}: ${r.days} days, ${r.accepted ? "accepted" : "back to the onboard step"}`);
for (const reason of r.reasons) console.log(` ${reason}`);
}output
One line for each window with its count of days and its decision, and then each reason of a refusal.
lab-target-a: 14 days, accepted
lab-target-b: 12 days, back to the onboard step
window has 12 days, the rule asks for 14
day 5: good canary failed (a pass became a fail)
day 8: pass share 0.91 is below 0.95The output shows one window that meets each condition. The second window is too short, and it has a failed good canary and a low pass share.
failure modes
| problem | cause | correction |
|---|---|---|
| The oracle reads a block page with the status 200 as a pass, and nobody sees it. | The canary sees only a pass that becomes a fail. | Add a bad canary that must fail. |
| The verdict of each attempt on a target stays unknown. | The target has no oracle rule. | Write the rule and its test from the report, or use a render floor with a stated risk. |
| The acceptance rule changes after a bad day. | The rule was not written before the window. | Write the rule in the record before the window starts. |
| The customer pays for a target that fails in the first week. | The charge starts before the acceptance record. | Start the charge only after the record. |
| The canary measures a special treatment of the canary. | The defender recognizes the request of the canary. | Compare the canary result with the oracle results on the records of the day. |
check questions
How does the test of an oracle rule work?
- It gives the oracle a stored good page and a stored bad page, and it checks both verdicts.
- It sends many requests to the site until the site refuses one.
- It counts the fields of one page.
answer
a. It gives the oracle a stored good page and a stored bad page, and it checks both verdicts.
The test of the rule uses two stored pages with known verdicts. The good page must pass, and the bad page must fail.
Explain why a canary must signal in two directions.
sample answer
A change can go in two directions. A pass can become a fail, and a fail can become a false pass. For example, the oracle reads a block page with the status 200 as a pass. A canary that watches one direction only misses the other. Thus a good canary must pass, and a bad canary with a stored bad page must fail.
A window has 14 days. The pass share is above the floor on each day. On day 6, the good canary gives fail. What is the decision?
- Accept, because the pass share is above the floor
- Accept, because only one day failed
- Back to the onboard step, because a pass became a fail on day 6
answer
c. Back to the onboard step, because a pass became a fail on day 6
Each day must meet each condition of the acceptance rule. A good canary that fails shows a pass that became a fail. The target goes back to the onboard step, and a new window starts after the repair.
When must the acceptance rule be in writing?
- After the first bad day of the window
- Before the window starts
- After the charge starts
answer
b. Before the window starts
The rule is written before the window starts, so that a result cannot change it.
Name the parts of an acceptance record.
sample answer
The version of the extractor, the oracle rule and its test, and the two canaries. Also the written acceptance rule, and the result of each day with the decision.
exercise
exercise Do this task on paper, with the synthetic days of one acceptance window below. Use this example acceptance rule. The window has at least 14 days. On each day, the pass share is 0.95 or more, the good canary gives pass, and the bad canary gives fail.
| days | pass share of the oracle | good canary | bad canary |
|---|---|---|---|
| 1 to 9 | 0.97 on each day | pass | fail |
| 10 | 0.98 | pass | pass |
| 11 to 14 | 0.96 on each day | pass | fail |
- Apply each condition of the acceptance rule to the window.
- Write each day that does not meet a condition, with the reason.
- Write the decision: accept, or back to the onboard step.
sample answer
The answer uses the 14 synthetic days of the task.
The window has 14 days, and the pass share is 0.95 or more on each day. The good canary gives pass on each day. On day 10, the bad canary gives pass, thus the oracle read a bad page as a pass. That is a false pass.
The decision is: back to the onboard step. The oracle rule gets a correction, and a new window starts after the repair. The charge does not start.
sources
- My model of the onboard step, of the two canaries, and of the acceptance record, 2026-11 (not public).
- Course design: the acceptance rule of the acceptance window and its example values, 2026-11 (not public).