Basic

The extension answers with a report

An extension that changes a page and says nothing is an extension that cannot be reviewed. The report is the numbers, and the numbers are the claim.

What you will see

review allowed. Zero outside is the accepted claim.

About 1 min of reading

Try It

Write a shown report

1

Write the counts

printf 'read 40 changed 12 refused 0 hosts 1\n' > /tmp/r.txt; cat /tmp/r.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line with four numbers. Four numbers is the claim.
2

Write a refusal report

printf 'refused 1 host=third.com\n' >> /tmp/r.txt; tail -1 /tmp/r.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line with a name. Written on refusal is what makes it readable.
3

Check the outside hosts

printf 'hosts_outside 0\n' | awk '{print ($2==0) ? "review allowed" : "review refused"}'

Before you run it, say out loud what it will print. Then open the answer.

What it prints
review allowed. Zero outside is the accepted claim.

Data Flow

A run to a shown report
1 The counts are collected during the run
↓
2 Refusals are written with their names
↓
3 The report is written even on refusal
↓
4 The report is shown in the page as text
Why this works
Why the report is shown in the page

The page is where the change is. A report where the change is is a report that needs no other window.

The one number that must be zero

The hosts outside the list. Zero is the accepted claim, and zero is what the review checks.

Examples

The report has counts

Read, changed, refused, hosts touched. Four numbers, and four numbers is a claim.

A refusal is in the report

The report is written even when the extension refuses. Written on refusal is what makes a failure readable.

The report is shown, not hidden

Shown in the page as text. Text is what a reader of the page reads, and a reader is the reviewer.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Storage as a keyed area
Previous Lesson
Storage as a keyed area
Next Lesson
Permissions narrowed to the page
Permissions narrowed to the page →