Skip to content

fix(quality): name the four steps of the references audit - #989

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/references-audit-complexity
Sep 6, 2026
Merged

fix(quality): name the four steps of the references audit#989
rubenvdlinde merged 1 commit into
developmentfrom
fix/references-audit-complexity

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

phpmd measured execute() at cyclomatic complexity 22 against a threshold of
10 and refused it. shillinq hit the same wall on the same generated shape and
was fixed in shillinq#1517; this is the equivalent, so the four apps keep one
audit shape rather than drifting apart.

The branching was never incidental. It is a five-way classification plus a
write decision, and naming the parts is what lets execute() read as "read,
index, audit, report":

method responsibility
ownerIndex() index owners by the identity key, and survive an unreadable owner
auditRows() classify every row, writing the unambiguous ones when allowed
classifyRow() the five-way verdict
backfill() one patch write
report() the one-line summary

Behaviour is unchanged, including the order the cases are tested in, which
matters: a row already carrying a reference is never a backfill candidate,
regardless of what its identity key would have matched.

Why this exists at all

I did not run phpmd before pushing the first version. composer phpmd over all
of lib/ is OOM-killed on this machine and reports a false pass, so it was run
per file this time — and the exit code was read rather than tail's, which had
already masked one result earlier in this work.

check result
phpmd, per file 0 findings, exit 0
PHPCS / Psalm / PHPStan 0
PHPUnit green

humaniq's command was re-run on the rig after the refactor and reports the same
tally as before it.

🤖 Generated with Claude Code

phpmd measured execute() at cyclomatic complexity 22 against a threshold of 10
and refused it. shillinq hit the same wall on the same generated shape and was
fixed in shillinq#1517; this is the equivalent, so the four apps keep one
audit shape rather than drifting.

The branching was never incidental. It is a five-way classification plus a
write decision, and naming the parts is what lets execute() read as "read,
index, audit, report": classifyRow(), auditRows(), backfill(), ownerIndex()
and report(). Behaviour is unchanged, including the ORDER the cases are tested
in, which matters — a row already carrying a reference is never a backfill
candidate regardless of what its identity key would have matched.

I did not run phpmd before pushing the first version, which is the whole
reason this exists. `composer phpmd` over all of lib/ is OOM-killed on this
box and reports a false pass, so it was run per file this time, and the exit
code was read rather than tail's.

Verified: phpmd 0 findings, PHPCS 0, Psalm 0, PHPStan 0, tests green, and
humaniq's command re-run on the rig reports the same tally as before the
refactor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rubenvdlinde
rubenvdlinde merged commit 441081a into development Sep 6, 2026
35 checks passed
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ 830db1c

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
check-vue-demi
test-l10n
format
check-schema-l10n
check-l10n-js
composer ✅ 130/130
npm ✅ 714/714
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman ⏭️
Playwright ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development
Hydra gates

Quality workflow — 2026-09-06 18:39 UTC

Download the full PDF report from the workflow artifacts.

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