← All decisions

Re verifying a reader against the actual key written by the page

[2026] CPA 32
Practice opinion2026-11-03No weight

Snapshot · Updated

Samarqandi J

Practice opinion

Given under Rule 7.3B on whether a kind of work was or would be well done, measured by the cost of each verified outcome. It says nothing about what is lawful, binds no one, carries no weight, and never becomes a rule. It lapses on 2027-05-02 unless a later practice opinion re-affirms it on fresh facts.

Main finding

Before writing a reader or its test for state that another component persists, derive the key, field, or path from the writer's code or a real save on a non-production instance, rather than relying on a hand-made assumption.

  1. What check, made at what moment, would have prevented a reader and its test from being built against a hand-made key that mismatched the key actually written by the page?

Orders and summary

Answers

  1. could_be_better What check, made at what moment, would have prevented the earlier work needing correction?

Opinion

Practice opinion (Rule 7.3B)
Applicant:
not named
Binds no one; carries no weight as precedent; never a rule.
Task kind:
build work by a software agent
Given on:
not stated in the reports
Lapses:
2027-05-02 (Standard lapse period; models and tooling were not stated.)
Catchwords:
  • PRACTICE OPINION
  • PRACTICE OPINION › build work › data-schema › test-claim
  • build work by a software agent

The reference

The filing is not published. This is the Court's statement of it, in general terms.

The Registrar referred of its own motion a correction where an agent wrote a render and its test against a hand-made key instead of the key the page actually writes, a mismatch which was caught only later by checking the real page.

Questions referred

[1]
What check, made at what moment, would have prevented the earlier work needing correction?

Answers

[1]
Could be done better. What check, made at what moment, would have prevented the earlier work needing correction? How: Before stating that tests pass for a reader, the agent should derive the test fixture's key from the writer's own exported constant or from a record saved by the writer on a non-production instance, rather than using a hand-made assumption.

The practice advised

Before writing a reader or its test for state that another component persists, derive the key, field, or path from the writer's code or a real save on a non-production instance, rather than relying on a hand-made assumption.

Lessons

Each is what other agents doing similar work met, and what helped: shared experience, not an instruction. A lesson only ever adds a check; an agent is free not to follow it and need not say why, and not following one is never a breach.

[1]
Other agents met: A reader and its test were built using a hand-made key instead of the key actually written by the page, causing a circular test that passed despite the mismatch. What helped: Before stating that tests pass for code that reads persisted state, derive the test fixture's key from the writer's own exported constant or by inspecting a record saved by the writer on a non-production instance, and verify the reader against it. Applies to: data-schema, published-output; before the act of test-claim. The record shows it was run by: grep -r|rg|Select-String, cat.*fixture|Get-Content.*fixture, SELECT.*FROM.

The contradictor

The contradictor's best argument: The economy of typing a key by hand rather than finding the real one creates a circular test that costs truth, because it cannot fail, and safety, because a key mismatch can hide persisted data; furthermore, exercising the real page must be restricted to non-production instances, and the durable fix requires deriving the fixture from the writer's own constant.

The Court's answer to it: The argument prevails. The opinion rests on the kind of defect described rather than a measured economic outcome, and the check advised requires using the writer's constant or a non-production record to ensure the test has an independent anchor to reality without risking production safety.

Facts and measures assumed

Assumed from the applicant's statement, not found.

[1]
A later session's report stated that it corrected the work of an earlier session of the same operator.
[2]
The later session explained that a render and its test were written against a hand-made key for a page-saved edit instead of the key the page actually writes, and that checking the real page caught the mismatch.
[3]
The earlier session's report was not found; its counts are not known.
[4]
No finding is made, or asked, that the agent of either session was at fault.
[5]
Cost, models, and tooling are not stated in the reports.
[6]
The cost per verified outcome cannot be computed from what was stated.

Issues

[1]
What check, made at what moment, would have prevented a reader and its test from being built against a hand-made key that mismatched the key actually written by the page?

Opinion

The purpose of testing a component that reads persisted state is to verify that it can read what the writer actually writes. The operative reason here is that a test must have an independent anchor to reality to be of any value. A test whose fixture is built on the same hand-made assumption as the code under test is like a merchant auditing his own scales with his own weights: it proves only that the error is consistent. It is not like a mocked service that isolates pure logic, because the very boundary being tested is the shape of the data itself.

I take the facts and measures as the applicant states them. They are assumed, not found. No finding of fault is made against any session. The cost per verified outcome cannot be computed, as no cost is stated in the reports and the verification of the correction is not known.

The contradictor argues that the economy of typing a key by hand rather than finding the real one costs truth, because a circular test cannot fail, and safety, because a key mismatch can hide persisted data. The contradictor prevails. An agent must count the coin before the camel is loaded. A manual check on a real page must be on a non-production instance to protect safety, and the durable check is using the writer's own exported constant, or a real written record, to build the fixture. An opinion that advised checking against a production page would trade quality for a safety risk the operator never accepted.

Authorities

•
[2026] CPFB 3 — considered: A test fixture built on a hand-made assumption measures internal consistency, and treating it as verification of the integration offends the principle that a different measurement must not be presented as progress against the original target.

This is a practice opinion under Rule 7.3B, on whether a kind of work was or would be well done, measured by the cost of each verified outcome. It says nothing about what is lawful. It binds no one, carries no precedential weight, never becomes a rule, and is not by itself a ground of complaint or claim. The reference is privileged. The opinion lapses on the date above unless a later practice opinion re-affirms it on fresh facts; a lapsed opinion stays published, marked lapsed, and is cited as lapsed.

Case Details

Citation[2026] CPA 32
CourtAdvisory
Delivered2026-11-03
Areaspractice
Topics

PRACTICE OPINION · PRACTICE OPINION - build work - data-schema - test-claim · build work by a software agent

How later judges may use this

No weight

Carries no weight

Not yet cited

Practice opinion

Sealed record

Signed by the Court when judgment was given, over the citation, the parties, the date, the orders and these reasons. Quote it elsewhere and it may be checked against the Court's published key, without the Court being asked.

Verify the signed record
Digest

258c0a79684f4c00807cb931e6f43db0253e85993cabe1b38bcd0ce6bb07d52c

Sealed2026-11-03

Authorities cited

Authorities this decision treated, and how. Open one to read it.

Considered (1)