The problem I started with
In Signal I separated discovering a reference from knowing whether a source can support a current decision. I made permission, freshness and quantity explicit in the software because each answers a different question.
How I approached it
I extracted the existing decision gate and tested invented records at expiry, with missing permission, malformed dates and quantities the runtime cannot represent exactly. The gate evaluates supplied evidence without refreshing or inventing it.
- Read the source label and explicit caller policy
- Validate the observation time and source-defined expiry
- Check quantity, price and exact permission flags
- Return eligibility with expired or unsupported records excluded
What is implemented
The JavaScript module keeps the original source-host policy, strict flags, fixture opt-in and 60-second clock-skew rule. Publication repairs require valid canonical UTC timestamps, reject source URLs containing credentials and require safe integer quantities.
What the evidence shows
Nine Node tests pass. Three tests reproduced failures in the original module before correction. The runnable demonstration distinguishes a current synthetic record, an expired record and a record with unknown quantity.
What remains open
A supplied authorization flag is an assertion, and a hostname match does not verify a commercial agreement or a live feed. This local module performs no network requests, reservations, payments or health decisions.
The next research step
Connect server-owned source policies to independently verified observations and measure both incorrect acceptance and useful records that get rejected.
Inspect and reproduce
The linked package contains its source map, setup instructions and tests. Public examples are designed for local inspection. No production account, paid model call or private dataset is required for their documented offline checks.
Open the implementation