Skip to content

Harden pcatR summaries, suppression, and PDF export before CRAN#4

Merged
nianbin2025 merged 8 commits into
mainfrom
codex/precran-analytic-hardening
Jul 19, 2026
Merged

Harden pcatR summaries, suppression, and PDF export before CRAN#4
nianbin2025 merged 8 commits into
mainfrom
codex/precran-analytic-hardening

Conversation

@JaeManP

@JaeManP JaeManP commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

This draft hardens the pcatR 1.0.1 pre-CRAN candidate by correcting:

  • the complete five-category neutral numerator through a distinct n_neutral_complete;
  • the five-category partition invariant by deriving all five counts from pcat_class5;
  • pct_complete_class as the share of valid-direction records with a complete five-category classification;
  • small-cell suppression so modal_class is hidden with numeric analytic results;
  • unavailable polarization so it is represented as NA, not confirmed FALSE;
  • invalid-direction strength consistency;
  • failure-safe, preflighted profile-PDF export, including directory-path protection and finite page dimensions;
  • finite scalar validation for consensus and action-plan probability thresholds;
  • source-archive README links to excluded release records; and
  • provisional release-validation documentation.

Why

The previous implementation could produce a complete-category distribution above 100%, expose a modal response classification in a suppressed cell, assign a valid-looking strength to an invalid direction, leave a partial PDF after a later-page failure, unintentionally accept vector threshold inputs, document a completeness field that was absent from the API, and potentially rename an existing directory supplied as an overwrite target.

Methodological boundaries

  • No item wording changed.
  • No original or updated CFIR mapping changed.
  • No response-code meaning changed.
  • No purported validated overall pCAT score was introduced.
  • Directional and complete-category denominators remain intentionally distinct.
  • Strategy candidates remain deliberation prompts rather than prescriptions.

Repository integration

  • PR Record Lilac Li CRAN authorization #3 was merged by Lilac Li before this branch was restacked.
  • Current base branch: main.
  • Current base and merge-base SHA: c1a93994633a94608238565e8f893a797d8e32a7.
  • Current hardening head: 43ae025a491ce6ebde713b1431588a983155c83b.
  • The restacked tree is byte-for-byte identical to the previously validated hardening tree; only commit identities changed during rebase.
  • Previous workflow, artifact, and candidate-hash identifiers are historical and are not evidence for this restacked head.

Local verification

  • devtools::test(stop_on_failure = TRUE): 236 expectations, 0 failures, 0 errors, 0 warnings, 0 skips.
  • Focused summary/consensus and analysis/export regression files: 139 expectations, all passing.
  • pcat_self_test(): 25/25 passing.
  • devtools::check(cran = FALSE, error_on = "never"): 0 errors, 0 warnings, 0 notes.
  • Exact local archive: pcatR_1.0.1.tar.gz.
  • Pre-freeze local archive SHA-256: a8ee1f3e02861eda11281e4390207335339dd4312cf17ab69bf4a925eee44377.
  • Archive entries: 81.
  • Archive inspection: guide source/HTML/PDF present; private, development, and release-control files absent; archived README has no relative links to excluded release records.
  • Clean exact-archive installation: passed; version 1.0.1, 25 self-tests, analytical regressions, suppression, successful PDF export, failed-export cleanup, and directory-target preservation all passed.
  • R CMD check --as-cran on the exact local archive: 0 errors, 0 warnings, 3 explained notes (new submission, host clock unavailable, and the local R 4.4 validator rejecting R-generated HTML5 elements).
  • Spelling: 0 findings.
  • URL check: all 14 URLs correct.
  • Clean pkgdown build: passed; home, reference, articles, citation, authors, license, attribution, release, and news pages inspected for the amended content.
  • Guide render: self-contained HTML and 24-page Letter PDF regenerated; every PDF page visually inspected with no clipping, overlap, malformed tables, missing glyphs, or broken footers.

Current GitHub Actions verification

Exact restacked head under test: 43ae025a491ce6ebde713b1431588a983155c83b.

  • R CMD check workflow: 29672326904 — passed.
  • Coverage workflow: 29672326903 — passed; overall line coverage: 84.86%.
  • pkgdown workflow: 29672326930 — passed; deployment was intentionally skipped for this draft PR.
  • Passed standard matrix jobs: Windows R-release, macOS R-release, Ubuntu R-release, R-devel, R-oldrel-1, and R 4.1.
  • Exact archive build job: 88153490605.
  • Exact downloaded-archive full-manual jobs: R-release 88153566507; R-devel 88153566514.
  • Source artifact: ID 8437716422, name pcatR-1.0.1-source.
  • Check-log artifacts: R-release ID 8437732735; R-devel ID 8437733655.
  • pkgdown artifact: ID 8437718938.
  • CI candidate archive: pcatR_1.0.1.tar.gz.
  • CI candidate archive SHA-256: 61c549ae6ebc764f0471bda85cae7cccf710276b4a4ef99053afe7b7059b79b9.
  • The internal pcatR_1.0.1.sha256 agrees with the independently downloaded archive.
  • Both exact-archive jobs verified the checksum before checking the same bytes.
  • Both exact-archive checks completed with 0 errors, 0 warnings, and 2 explained notes: new submission and unavailable HTML Tidy.
  • Independent inspection confirmed 81 archive entries; all guide formats and amended source code are present; the private statement, release-control files, and development-only files are absent; and the archived README uses explicit repository links for excluded release records.
  • The downloaded pkgdown artifact contains the new completeness field, unknown-polarization semantics, PDF path/dimension safeguards, and correct Lilac Li/Jae Man Park authorship order.

The completed pre-restack workflow identifiers and artifacts have been superseded by this exact-head run set and are not presented as current evidence.

Remaining external gates

  • Original instrument authors' written package-name and source-content confirmation.
  • Final source freeze.
  • Exact frozen-archive Win-builder R-release and R-devel checks.
  • CRAN submission and email confirmation.
  • Post-acceptance v1.0.1 tag and GitHub Release.

This PR does not submit the package to CRAN, does not run or claim Win-builder validation, does not freeze the final submission archive, and does not create a release tag.

Base automatically changed from codex/record-lilac-authorization to main July 19, 2026 03:44
@JaeManP
JaeManP force-pushed the codex/precran-analytic-hardening branch from 3f89a5c to 43ae025 Compare July 19, 2026 03:48
@JaeManP
JaeManP marked this pull request as ready for review July 19, 2026 03:57
@JaeManP
JaeManP requested a review from nianbin2025 July 19, 2026 03:57
@nianbin2025
nianbin2025 merged commit 36ca2da into main Jul 19, 2026
12 checks passed
@nianbin2025
nianbin2025 deleted the codex/precran-analytic-hardening branch July 19, 2026 03:58
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