chore: remove dead _checkPermission param + CI coverage gate (#107) - #160
Merged
Conversation
…#107) Sub-tasks completed: 1. _checkPermission(createdBy) → _checkPermission() - Remove unused createdBy parameter (dead since #152 — all logged-in users can edit) - Remove createdBy argument from all 4 callers (saveData, updateScheduleMetadata, deleteSchedule, copySchedule) - Remove now-unused 'const createdBy = rowValues[3]' declarations - Remove unused rowValues destructuring in updateScheduleMetadata and deleteSchedule - Update backendSignatureContracts.test.js param count 1 → 0 2. EXTRACTED_TO_LIB cleanup — no action needed (grep found zero matches) 3. CI coverage gate — change t8 Vitest step from 'npm test' to 'npx vitest run --coverage' so coverage thresholds are enforced 4. PHP P2 — existing 60 PHP tests already cover: - index.php routing (IndexRoutesTest.php, 10 tests) - generate_iframe.php access (AccessControlTest.php, 5 tests) ESLint 0 errors, all 1164 tests pass, coverage thresholds pass. refs #107 Agend-Agent: cb-team-impl2 Agend-Branch: chore/107-cleanup Agend-Issued-At: 2026-06-24T12:47:06.972137+00:00
Owner
Author
✅ VERIFIEDReviewed HEAD: Files Reviewed (3)
Stage 1 — Correctness
Stage 2 — Security
Evidence
|
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final cleanup PR for #107 coverage sprint — dead code removal + CI hardening.
Changes
1.
_checkPermission(createdBy)→_checkPermission()The
createdByparameter became dead code after #152 (all logged-in users can edit). This PR:saveData,updateScheduleMetadata,deleteSchedule,copySchedule)const createdBy = rowValues[3]declarationsrowValuesdestructuring in 2 functionsbackendSignatureContracts.test.jsexpected param count: 1 → 02. EXTRACTED_TO_LIB cleanup
No action needed — grep found zero
EXTRACTED_TO_LIBorNOT_EXTRACTABLEcomments inJavaScript.html.3. CI coverage gate
Changed CI
t8 Viteststep fromnpm testtonpx vitest run --coverageso coverage thresholds (defined invitest.config.js) are enforced on every PR.4. PHP P2 verification
Existing 60 PHP tests already cover both targets:
index.phprouting →IndexRoutesTest.php(10 tests, subprocess-isolated route error paths)generate_iframe.phpaccess →AccessControlTest.php(5 tests, token-based access control)Files Changed (3)
程式碼.jscreatedByparam + unused variables (-8 lines)tests/unit/backendSignatureContracts.test.js.github/workflows/ci.ymlnpm test→npx vitest run --coverageVerification
npx eslint 程式碼.js— 0 errors ✅npm test— 1164/1164 pass ✅npx vitest run --coverage— all thresholds pass ✅refs #107
follows spec