Skip to content

docs(memory): record the Pest toContain arity trap and the mutate-and-revert data-loss trap - #783

Merged
pekral merged 1 commit into
masterfrom
memory-pr782
Aug 25, 2026
Merged

pekral merged 1 commit into
masterfrom
memory-pr782

Conversation

@pekral

@pekral pekral commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary

Compound-memory zápis po #782, podle @rules/compound-engineering/general.mdc Write protocol. Dva poznatky, oba prošly promotion barem.

Nový záznam — pest-tocontain-is-variadic-not-needle-plus-message. Pestí řetězcový toContain() bere variadické jehly, ne (needle, message). Zpráva předaná jako druhý argument se stane druhým hledaným řetězcem, takže test spadne na textu, který v souboru nikdy být neměl, a diagnostika ukazuje na zprávu místo na skutečnou mezeru. Řešení: expect(substr_count($haystack, $needle))->toBe(1, $message) — zprávu unese a navíc pinuje unikátnost, kterou po nás stejně chce [[verify-pin-tests-load-bearing-via-mutate-and-revert]].

Zesílený záznam — verify-pin-tests-load-bearing-via-mutate-and-revert. Ten záznam nařizuje mutate-and-revert, ale neříkal, čím mutaci vrátit. git checkout -- <file> obnoví soubor z indexu, takže na nezakomitované práci smaže celou sekci, kterou pin chrání — a git status pak vypadá čistě, což je přesně to, proč se ztráta snadno přehlédne. Mutaci ruš inverzním sed (nebo stash/restore), dokud práce není zakomitovaná.

Kurátorský průchod: první poznatek je nový (žádný Pest-idiom záznam v souboru neexistoval), druhý podle pravidla Dedup zesiluje existující záznam místo zakládání druhého.

Changes

# co commit SHA nezávislost
A1 zápis obou poznatků do docs/memory/PROJECT_MEMORY.md docs(memory): record the Pest toContain arity trap and the mutate-and-revert data-loss trap viz commit independent

Jak otestovat

composer build — zeleně (389 testů, 2664 assertions, 100 % coverage). Soubor je projektová data, žádný pin test se ho nedotýká.

@pekral

pekral commented Aug 25, 2026

Copy link
Copy Markdown
Owner Author

Status: converged
Counts: Critical 0 · Moderate 0 · Minor 0 · Refactoring 0
Last updated: head of memory-pr782

Summary: assignment conformance: conformant — the compound-memory write mandated by @rules/compound-engineering/general.mdc Write protocol after PR #782 · reviewer comments: none · no linked issue — issue summary skipped · the diff touches docs/memory/PROJECT_MEMORY.md only: project data the installer never syncs, no executable line, no src/ change, so the coverage gate reports nothing and no Architecture or Database Analysis section applies. Curation pass honoured: the Pest-arity lesson is new (the file carried no Pest-idiom entry), and the mutate-and-revert lesson strengthened the existing entry rather than adding a second per Dedup. composer build green — 389 tests, 2664 assertions, 100% coverage.

@pekral
pekral merged commit 3e4eda1 into master Aug 25, 2026
1 check passed
@pekral
pekral deleted the memory-pr782 branch August 25, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant