Rules-as-code · Plain-English guide
How the digitised rules for Victoria's Forests (Domestic Firewood) Regulations 2022 decide whether firewood may be collected — and what an application must include. No code, no jargon left unexplained.
When someone describes a proposed firewood collection, the rules work out two things automatically:
Everything below is worked out by the same small set of rules, evaluated top-to-bottom: when two rules touch the same thing, the later one wins. That single idea explains the whole “can you collect?” decision.
You provide a fact the applicant enters. Rules work out a conclusion the rules calculate.
The activity's details (cutting / taking away / towing trees, bringing in and operating heavy machinery, filling a chainsaw) and the people involved (each with a name and physical address; the applicant also has a telephone).
The status of “may the person collect firewood?” changes as three rules apply in order (later rules win): a Forbidden default; opened to Permitted when in a collection area and in season; then back to Forbidden if it also involves cutting/taking away trees and is within 20 m of a watercourse.
| In area? | In season? | Cut/take away and near water? | Result |
|---|---|---|---|
| No | — | — | Forbidden |
| Yes | No | — | Forbidden |
| Yes | Yes | No | Permitted |
| Yes | Yes | Yes | Forbidden |
Also forbidden in a collection area during a season
Independently of the above, towing trees, bringing heavy machinery in, and operating heavy machinery are each Forbidden whenever the activity is in a collection area during a collection season — even where collecting itself is permitted.
If the applicant nominates a person to act on their behalf, a set of Applicant and Nominee details become Required (given name and full address, plus the applicant's phone); title, other names and apartment number stay Optional. If no one is nominated, this section adds no requirements.
Coverage at a glance
2 test suite(s), 6 scenario(s), 0 expectation(s) in total. 0 scenario(s) assert an outcome; 6 assert nothing (inputs only).
Scenarios that assert nothing exercise the rules but cannot pass or fail — they are a coverage gap worth noting.
The six scenarios are well chosen as situations: collecting in a designated area during a season, collecting near a watercourse, towing/winching, bringing in heavy equipment, and the two nomination cases together touch every branch of the logic. The problem is that not one of them asserts an expected outcome — each supplies inputs but declares no expectation, so the suite runs the rules without ever checking them. A green run here proves only that evaluation didn't error, not that the answers are right.
To make the coverage real, add expectations such as: the designated-area-and-season case expects collectFirewood = Permitted; the cutting/taking-near-water case expects Forbidden (the watercourse override); the towing case expects includesTowingTrees = Forbidden; the two heavy-machinery cases expect their activity Forbidden; and the “with nomination” case expects the applicant and nominee fields to become required. A negative baseline (outside any area or season → Forbidden) and a case that would expose the missing family-name requirement would close the remaining gaps.
Given these inputs
| @id: | EUSjiAYNU4cdcyZUXQWKiD4L |
| @type: | Regsoft |
| @name: | Collection permitted in designated area during collection season |
| firewoodCollectionApplication.activities.includesBringingHeavyMachineryIntoArea: | False |
| firewoodCollectionApplication.activities.includesCuttingTrees: | True |
| firewoodCollectionApplication.activities.includesOperatingHeavyMachinery: | False |
| firewoodCollectionApplication.activities.includesTakingAwayTrees: | True |
| firewoodCollectionApplication.activities.includesTowingTrees: | False |
| firewoodCollectionApplication.activityOccursDuringAFirewoodCollectionSeason: | True |
| firewoodCollectionApplication.activityOccursInFirewoodCollectionArea: | True |
| firewoodCollectionApplication.collectionAreaIsWithin20MetresOfAWatercourse: | False |
| firewoodCollectionApplication.collectFirewood: | True |
Then expect
Nothing asserted — this scenario has no expectations.
Given these inputs
| @id: | 0WyTLvcy8qFsMQKBsEABaaTB |
| @type: | Regsoft |
| @name: | Collecting firewood near a waterway |
| firewoodCollectionApplication.activities.includesBringingHeavyMachineryIntoArea: | False |
| firewoodCollectionApplication.activities.includesCuttingTrees: | False |
| firewoodCollectionApplication.activities.includesOperatingHeavyMachinery: | False |
| firewoodCollectionApplication.activities.includesTakingAwayTrees: | True |
| firewoodCollectionApplication.activities.includesTowingTrees: | False |
| firewoodCollectionApplication.activityOccursDuringAFirewoodCollectionSeason: | True |
| firewoodCollectionApplication.activityOccursInFirewoodCollectionArea: | True |
| firewoodCollectionApplication.collectFirewood: | True |
| firewoodCollectionApplication.collectionAreaIsWithin20MetresOfAWatercourse: | True |
Then expect
Nothing asserted — this scenario has no expectations.
Given these inputs
| @id: | dgCbR2YhmFAJntuBX1VKhMqf |
| @type: | Regsoft |
| @name: | Towing or winching trees |
| firewoodCollectionApplication.activities.includesBringingHeavyMachineryIntoArea: | False |
| firewoodCollectionApplication.activities.includesCuttingTrees: | True |
| firewoodCollectionApplication.activities.includesOperatingHeavyMachinery: | False |
| firewoodCollectionApplication.activities.includesTakingAwayTrees: | True |
| firewoodCollectionApplication.activities.includesTowingTrees: | True |
| firewoodCollectionApplication.activityOccursDuringAFirewoodCollectionSeason: | True |
| firewoodCollectionApplication.activityOccursInFirewoodCollectionArea: | True |
| firewoodCollectionApplication.collectFirewood: | True |
| firewoodCollectionApplication.collectionAreaIsWithin20MetresOfAWatercourse: | False |
Then expect
Nothing asserted — this scenario has no expectations.
Given these inputs
| @id: | zT9pVDAAFuOZP6Km9V7VpRR1 |
| @type: | Regsoft |
| @name: | Bringing in heavy equipment |
| firewoodCollectionApplication.activities.includesBringingHeavyMachineryIntoArea: | True |
| firewoodCollectionApplication.activities.includesCuttingTrees: | True |
| firewoodCollectionApplication.activities.includesOperatingHeavyMachinery: | False |
| firewoodCollectionApplication.activities.includesTakingAwayTrees: | True |
| firewoodCollectionApplication.activities.includesTowingTrees: | False |
| firewoodCollectionApplication.activityOccursDuringAFirewoodCollectionSeason: | True |
| firewoodCollectionApplication.activityOccursInFirewoodCollectionArea: | True |
| firewoodCollectionApplication.collectFirewood: | True |
| firewoodCollectionApplication.collectionAreaIsWithin20MetresOfAWatercourse: | False |
Then expect
Nothing asserted — this scenario has no expectations.
Given these inputs
| @id: | EiJcbujmop3RxyP8ogpFoMjX |
| @type: | Regsoft |
| @name: | Without a nomination, personal details are not required |
| firewoodCollectionApplication.nominatePersonToActOnOnesBehalf: | False |
Then expect
Nothing asserted — this scenario has no expectations.
Given these inputs
| @id: | E0FD9MO2KD6mLHi0JKuP1trV |
| @type: | Regsoft |
| @name: | With nomination, personal details are required |
| firewoodCollectionApplication.nominatePersonToActOnOnesBehalf: | True |
Then expect
Nothing asserted — this scenario has no expectations.
1 · Applicant is missing a “family name” requirement
The applicant's given name is required twice and family name is never required — a likely copy-paste slip (the Nominee correctly requires both). An applicant could satisfy the form without ever giving a family name.
2 · An unused conclusion: “tow or wench”
The data model defines a rules-worked-out value tow or wench that no rule ever sets — an apparent leftover with no effect.
3 · Test scenarios assert nothing
All six test scenarios supply inputs but declare no expectations, so nothing is actually verified — see Test cases above for what to add.