Skip to content

Fix pytest suite (main CI) + BEM landing page restructure - #15

Merged
diese-tech merged 2 commits into
mainfrom
claude/ponytail-audit-ui-review-eavl1k
Jul 19, 2026
Merged

Fix pytest suite (main CI) + BEM landing page restructure#15
diese-tech merged 2 commits into
mainfrom
claude/ponytail-audit-ui-review-eavl1k

Conversation

@diese-tech

@diese-tech diese-tech commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Two independent changes ended up on the same branch/PR — noting that upfront since they're unrelated:

1. Fix main's CI (urgent)

main has been red since PR #14 merged. Root cause: PR #13 (the pytest suite) and PR #14 (block list / live panel state / admin-override logging) were developed in parallel against the same pre-merge base, coordinated to avoid touching the same files — which they didn't — but #13's tests still encoded the API surface and behavior exactly as it stood before #14 changed it. The moment both merged, 9 of the 92 tests failed against the new, intentional behavior.

This fixes the tests only — no production code changes. The behavior encoded by PR #14 (already reviewed, including two Codex-flagged fixes) is correct; the tests were stale.

What was stale and why:

  • test_command_tree.pyEXPECTED_COMMAND_NAMES didn't include yap block, yap unblock, yap modlog (all added in Add block list, live panel state, and admin-override audit logging #14).
  • test_panel.pyrefresh_panel_message dropped its owner parameter in Add block list, live panel state, and admin-override audit logging #14 (it now derives owner, lock/hide state, and the permit list from the DB/channel itself). Updated all four call sites from 3 args to 2, added a test for the owner-left-guild no-op path.
  • test_room_actions.pyapply_transfer/apply_kick now call bot.storage.get_active_temp_channel (needed for the new log_admin_action), missing from the shared _bot() fixture. Updated two refresh_panel_message call-arity assertions from 3 args to 2. Added a test locking in that an admin-initiated transfer is logged against the pre-transfer owner, not the post-transfer one.
  • test_temp_channels.py — the reconcile-time panel backfill now posts the room's real locked/hidden/permitted state instead of defaults; added a dedicated test covering an already-locked/hidden/permitted room.

pytest: 95 passed, 0 failed locally (was 9 failed, 83 passed, reproducing the actual CI failure first).

2. Restructure the landing page to BEM naming

Renamed every CSS class in docs/index.html to block__element--modifier form and reorganized the previously single-line minified stylesheet into commented sections, one per block, so the page is easy to hand-edit going forward.

Blocks: page-shell, site-header, button (+button-row), hero, stats, showcase, card (generic, reused by the features grid / steps / two-column sections / closing CTA via --accent-a/--accent-b/--cta modifiers), page-section (+--split), features, steps, code-sample, permissions, site-footer. .muted became the utility class .u-muted. The two positional nth-child shadow variants on the feature cards became explicit card--accent-a/card--accent-b modifiers, so reordering the cards in HTML no longer silently changes which one gets which shadow.

Purely a rename/reformat — verified pixel-identical rendering via a headless-Chromium screenshot before and after (byte-identical PNG, same SHA256) at 1400×1000. No visual, structural, or script change; the stats.json fetch script and its target element IDs are untouched.

Test plan

  • pytest: 95 passed, 0 failed
  • py_compile clean
  • No production .py file touched
  • Landing page: before/after screenshots byte-identical (same SHA256) — zero visual regression

claude added 2 commits July 19, 2026 22:46
PR #13 (test suite) and PR #14 (block list / live panel / audit
logging) were developed in parallel against the same pre-merge base;
#13's tests encoded the API surface as it stood before #14 changed it,
so main's CI went red the moment both merged. No production code
changes here -- the merged behavior is correct and already reviewed;
the tests were stale.

- test_command_tree.py: add yap block/unblock/modlog to the expected
  command set.
- test_panel.py: refresh_panel_message dropped its owner parameter
  (derives it from the DB instead); updated all four call sites and
  added a test for the owner-left-guild no-op path.
- test_room_actions.py: apply_transfer/apply_kick now call
  bot.storage.get_active_temp_channel (needed for log_admin_action),
  added to the shared _bot() fixture; refresh_panel_message call-arity
  assertions updated from 3 args to 2; added a test locking in that an
  admin-initiated transfer is logged against the pre-transfer owner,
  not the post-transfer one.
- test_temp_channels.py: reconcile's panel backfill now posts the
  room's real locked/hidden/permitted state instead of defaults, so
  the bot fixture needs storage.list_permits and the assertion needs
  the new kwargs; added a dedicated test covering a backfilled room
  that was already locked and hidden.

95 passed, 0 failed (was 9 failed, 83 passed on main).
Renamed every class to block__element--modifier form and reorganized
the (previously single-line minified) stylesheet into commented
sections, one per block, so the page is straightforward to edit going
forward.

Blocks: page-shell, site-header, button (+button-row), hero, stats,
showcase, card (generic, reused by features/steps/two-col
sections/closing CTA via --accent-a/--accent-b/--cta modifiers),
page-section (+--split), features, steps, code-sample, permissions,
site-footer. .muted became the utility class u-muted. The two
positional nth-child shadow variants on the feature cards became
explicit card--accent-a/--accent-b modifiers, so reordering the cards
in HTML no longer silently changes which one gets which shadow.

Purely a rename/reformat: verified pixel-identical rendering via a
headless-Chromium screenshot before and after (byte-identical PNG,
same SHA256) at 1400x1000. No visual, structural, or script change --
the stats.json fetch script and its target element IDs are untouched.
@diese-tech diese-tech changed the title Fix pytest suite broken by parallel PR #13/#14 merge Fix pytest suite (main CI) + BEM landing page restructure Jul 19, 2026
@diese-tech
diese-tech merged commit 8465d99 into main Jul 19, 2026
2 checks passed
@diese-tech
diese-tech deleted the claude/ponytail-audit-ui-review-eavl1k branch July 19, 2026 22:54
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.

2 participants