Learning

Core Ideas

Change the Promise Deliberately

Classify a change by its consequences and owner.

Downloads

One engineer replaces a storage implementation. Another changes the entry condition. The first edit might be large; the second might be one line. Their consequences decide the kind of review they need.

Before After Question
Find an account in a vector. Find it in an index. Are meaning, compatibility and pending work preserved?
Require confirmation before entry. Permit entry without it. Is the changed policy authorized?
New work uses provider A. New work uses B. Where does old unresolved work remain?
Registration is available. New registration is retired. Who still owns existing obligations?

Authority is the mandate to decide or act. An implementation convenience does not create it. The current task may already authorize a policy change; use that mandate rather than inventing another approval ceremony.

Engineering Depth

These two implementations make different entry decisions:

impl EntryRule for CookieValid {
    fn permits(_: bool) -> bool {
        true
    }
}
impl EntryRule for ConfirmedOnly {
    fn permits(confirmed: bool) -> bool {
        confirmed
    }
}

A change from one selection to the other must reach both initial and later visits. It should not accidentally alter unrelated verification or confirmation delivery.

Compare two review statements:

Statement Missing Reasoning
“Only one impl changed.” Which new behavior does it admit?
“All tests are green.” Do the checks represent the authorized promise, or the altered implementation?

The reference tests demonstrate the changed policy's consequence:

assert_eq!(
    shop.visit(&session).enter(),
    Err(EntryFailure::ConfirmationRequired)
);

That observation supports this configured model. It cannot approve the underlying business decision. Your project owns its checks and release cadence.

Your Reflection

A private helper is removed, but a test insists on its old three-call sequence. Must the new design preserve that sequence?

Worked Discussion

Trace the assertion back to a legitimate consumer requirement. Preserve required behavior and compatibility. If the sequence was only an incidental private arrangement, it can retire with the helper. Evidence should protect the commitment, not make obsolete machinery permanent.

Navigation