fix(static_checks): Playwright C# assertions + real Windows CI proofs + C# test_file resolution (follow-up to #4)#5
Conversation
|
Validated v0.9.5 (branch tip 1. Playwright assertions — FIXED ✅
3. Windows toolchain — CLEAN ✅Every subcommand ran with no 2. C# auto-discovery — common path FIXED ✅, edge cases belowThe original blocker is gone: I resolved all 92 empty- Per your request I pushed on the edge cases with throwaway fixtures.
Root causes + suggested fixes:
These only bite projects that actually have nested/generic/duplicate-name/partial test classes — our committed suite has none, which is why the 92-proof sweep was clean. They're not blockers for us; flagging them as the pre-merge feedback you asked for. Integrity held at 14/14 features VERIFIED, 100% throughout. Install note (Claude Code side, not purlin): on a corp network that blocks SSH (port 22), the documented |
|
Confirmed working on the reporter's real .NET 7 / Blazor / xUnit / Playwright project, 40/40 features VERIFIED at 100% integrity, Windows Action green. Merging into |
… CI proofs Pass-1 C# no_assertions now recognizes Playwright fluent assertions — Expect(...)/Assertions.Expect(...) chained to a To*Async() matcher — so tests that assert solely through Playwright are no longer false-flagged HOLLOW (PR #4 review). A bare Expect(x) with no matcher chain is still flagged (RULE-31, PROOF-55). To keep the broader structural acceptance from masking weak tests, Pass-2 audit criteria gain a "presence/visibility-only assertion" WEAK check (audit_criteria Criteria-Version 16 -> 17). Windows RULE-29/30 are now verified for real on a windows-latest GitHub Actions runner (.github/workflows/windows-proofs.yml) via the new @windows proof tier — PROOF-53 (native msvcrt lock path) and PROOF-54 (--load-criteria under the native console codec) — committed back by CI, in addition to the host simulations (PROOF-50/52). The schema_proof_format anchor (RULE-4) and spec_format.md (Format-Version 8) admit the platform-gated windows tier; the feature-scoped overwrite is per (feature, tier), so host runs that skip these tests never clobber the CI-emitted proof file. Also bumps .claude-plugin/plugin.json to 0.9.5 to match VERSION (the manifest was not bumped during the v0.9.5 release; purlin_version caught the drift). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
static_checks 29/29 rules proved across unit/integration/e2e + the new @windows tier (PROOF-53/54 from windows-latest CI). All 85 proofs pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…udit reachability) PR #4 follow-up: under `dotnet test`, TestCase.CodeFilePath is often null, so the xUnit logger emits proof entries with an empty test_file — which blocked purlin:audit from locating the .cs code for Pass 1 (scan) and Pass 2 (read). static_checks.py gains resolve_test_file_from_name() + a `--resolve-source <test_name>` CLI: it derives the declaring type from the fully-qualified test_name (segment before the final .method) and searches the project's source files (skipping bin/obj/node_modules/.git) for its class/struct/record/interface declaration, returning the repo-relative POSIX path of the best match (RULE-32, PROOF-56). skills/audit/SKILL.md uses this as a fallback when test_file is empty, and documents CollectSourceInformation + full PDBs as the native way to populate it (skill_audit RULE-16, PROOF-16). docs/testing-workflow-guide.md notes both. Also normalizes the pytest proof plugin's test_file to forward slashes (item.fspath.relto yields OS-native separators on Windows) — a no-op on POSIX — and normalizes the committed windows-tier proof file accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
static_checks 30/30 (vhash=01ad747d), skill_audit 16/16 (vhash=f670fc7a). Adds RULE-32/PROOF-56 (C# --resolve-source) and RULE-16/PROOF-16 (audit fallback docs). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
04cdca7 to
d161c46
Compare
Follow-up to #4, addressing the three review notes left on that PR. Stacked on
fix/windows-static-checks-3so the diff is just the new work; it will retarget tomainautomatically when #4 merges.What this addresses
1. C# Playwright assertions false-flagged HOLLOW (review note)
check_csharp'sno_assertionsguard now recognizes Playwright fluent assertions —Expect(...)/Assertions.Expect(...)chained to aTo*Async()matcher (ToBeVisibleAsync,ToHaveTextAsync,ToContainTextAsync, …). A bareExpect(x)with no matcher chain is still flagged. (static_checksRULE-31, PROOF-55.)To keep the broader structural acceptance from masking weak tests, Pass-2 audit criteria gained a presence/visibility-only assertion WEAK check (
audit_criteria.md→ Criteria-Version 17).2. Windows behavior was simulation-only (the original ask)
RULE-29/30 are now verified for real on a
windows-latestGitHub Action (.github/workflows/windows-proofs.yml) via a new@windowsproof tier — PROOF-53 (nativemsvcrtlock path,_HAS_FCNTLgenuinely False) and PROOF-54 (--load-criteriaunder the native console codec) — committed back by CI, alongside the existing host simulations (PROOF-50/52). Theschema_proof_formatanchor (RULE-4) andspec_format.md(Format-Version 8) admit the platform-gated tier; the feature-scoped overwrite is per(feature, tier), so host runs that skip these tests never clobber the CI-emitted file.3. Empty
test_fileblockedpurlin:auditon C# (review note)Under
dotnet test,TestCase.CodeFilePathis often null, so the xUnit logger emits a blanktest_file.static_checks.pynow exposes--resolve-source <test_name>, which derives the declaring type from the fully-qualifiedtest_nameand locates its.csfile (skippingbin/obj); the audit skill uses it as a fallback. Native population still requiresRunConfiguration.CollectSourceInformation=true+ full PDBs — now documented. (static_checksRULE-32 / PROOF-56,skill_auditRULE-16 / PROOF-16.)Also: bumped
.claude-plugin/plugin.jsonto0.9.5to matchVERSION(the manifest wasn't bumped during the v0.9.5 release;purlin_versioncaught the drift). Normalized the pytest proof plugin'stest_fileto forward slashes (no-op on POSIX).Verification
purlin:status: 40/40 features VERIFIED, integrity 100%.windows-latest— PROOF-53/54 pass natively.v0.9.5tag is moved to the validated commit.🤖 Generated with Claude Code