Skip to content

fix(ci): clear shellcheck findings (Gate: Code quality) - #129

Open
hyperpolymath wants to merge 1 commit into
mainfrom
fix/ci-shellcheck-pwg-scripts
Open

hyperpolymath wants to merge 1 commit into
mainfrom
fix/ci-shellcheck-pwg-scripts

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Fixes the Gate: Code quality shellcheck failure on main.

  • scripts/pwg-derive.sh SC1112: removed a unicode apostrophe from a comment inside the single-quoted jq program (reworded, no apostrophe needed).
  • scripts/test-gate-falsifiability.sh SC2030/SC2031: meta_canary now saves and restores PASS/FAIL instead of mutating them inside $(...). Behaviour is identical.

Verification

  • shellcheck --severity=style on both scripts: no SC1112, SC2030 or SC2031 remain (local 0.9.0; CI pins 0.11.0).
  • scripts/test-gate-falsifiability.sh: 19/19 canaries pass, including the meta-canary.
  • scripts/pwg-check.sh: passes.

Not in this PR

The Scorecard reconcile failure (fork-governance.yml and release.yml reusable refs absent from actions.lock) and the Hypatia RE002 finding (instant-sync.yml harden-runner egress-policy: audit) need the lock tooling and an egress allowlist respectively. Reported separately.


Generated by Claude Code

…sifiability.sh

SC1112: replace the unicode apostrophe in a jq comment with wording that
needs no apostrophe (the comment sits inside a single-quoted jq program).
SC2030/SC2031: meta_canary no longer mutates PASS/FAIL inside a command
substitution; it saves and restores the counters instead. Behaviour is
unchanged: canaries 19/19, pwg-check passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZnfGP6tuXgjeDPhEv4
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Improved the test gate’s handling of an intentionally failing check. Its failure is now assessed directly, while the surrounding pass and fail totals are preserved. This makes the test result clearer without changing application behaviour or affecting other checks.

The pull request updates a receipt-resolution comment and changes how meta_canary isolates and checks PASS and FAIL counters during its intentionally broken probe.

Changes: Shell script updates

Layer / File(s) Summary
Receipt-resolution comment
scripts/pwg-derive.sh
The comment now describes resolving a leg’s receipt IDs through the supplied receipt map. Executable behaviour is unchanged.
meta_canary counter isolation
scripts/test-gate-falsifiability.sh
meta_canary saves and resets the PASS and FAIL counters before the probe, captures its failure count, and restores the saved totals before checking the result.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 4d329

This change fixes ShellCheck warnings in two scripts without altering their behavior. It carries no meaningful merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix (shellcheck findings) and the gate it clears. It matches the two script changes: an SC1112 comment fix in scripts/pwg-derive.sh and SC2030/SC2031 fixes in scripts/test-gate-fal…
Description check Passed The description follows the required template's main sections: Summary, Verification (testing), and a note on exclusions. It states what changed and why, and it links the work to the failing gate. The…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix (shellcheck findings) and the gate it clears. It matches the two script changes: an SC1112 comment fix in scripts/pwg-derive.sh and SC2030/SC2031 fixes in scripts/test-gate-falsifiability.sh. The title is specific and accurate, though it does not name the scripts.

Full details: Description check

Explanation

The description follows the required template's main sections: Summary, Verification (testing), and a note on exclusions. It states what changed and why, and it links the work to the failing gate. The template's Changes list, RSR Quality Checklist, and Screenshots section are absent. The Testing content appears under Verification. The checklist items for SPDX headers, banned patterns, and documentation are not addressed, though most do not apply to a two-line shell script fix.

Resolution

Optionally add a Changes list and tick the applicable RSR Quality Checklist items (for example, Linter is clean, Tests pass, and No secrets included). Optionally state that no CHANGELOG or documentation update is needed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 155a0395-112c-4b08-8abd-146bab62b746
Commits

Reviewing files that changed from the base of the PR and between 0dceab6 and 4d32978.

Files selected for processing: 2

  • scripts/pwg-derive.sh
  • scripts/test-gate-falsifiability.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 7

  • GitHub Check: CodeRabbit
  • GitHub Check: Fleet report-backs / Fleet report-backs
  • GitHub Check: Lean grade-factorisation: lake build + sorry-free environment
  • GitHub Check: Lean grade-boundary: lake build + sorry-free environment
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Lean grade-boundary: lake build + sorry-free environment
  • GitHub Check: Lean grade-factorisation: lake build + sorry-free environment
Additional context used

GitHub Check: SonarCloud Code Analysis

scripts/test-gate-falsifiability.sh

[failure] 243-243: Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_trope-checker&issues=AaH0OKI-lSOJflccukE4&open=AaH0OKI-lSOJflccukE4&pullRequest=129

Additional comments: 1

scripts/test-gate-falsifiability.sh: 1

236-243: LGTM!

Finishing Touches
Fix failing CI checks

  • Commit to this branch
  • Create a new PR

@sonarqubecloud

Copy link
Copy Markdown

@linear-code
linear-code Bot marked this pull request as ready for review November 19, 2026 14:34
@hyperpolymath hyperpolymath assigned Copilot and unassigned Copilot Nov 19, 2026
@github-actions

Copy link
Copy Markdown

Fork governance

Lane Status Run
DEED syntax (repo deed) 🟢 conformant run 44544677464
K9-DEED conformance (L0–L2; L3 not verified) 🟡 conformant (advisory debt) (job: success) same run
Hypatia verdict grid 🔴 failing (job: failure; grid: 🟢 no graded findings) · advisory in grid scope: 🔴 red (0 critical, 9 high, not grading) same run

Scope: the three lanes below are static checks at the named commit. A
green row means every applicable check in its declared scope passed;
orange means evidence is missing, not that nothing was found. The
Hypatia verdict covers GATING rows only; advisory reporters are listed
in its grid and their severity counts are limited to the grid scope.
A blocking gate may inspect findings outside the delta grid’s grade; open
the linked run and check annotations for the failing step and, where
applicable, the finding. No row is a security certification.

K9-DEED conformance

k9-deed L0–L2 yellow

🟡 advisory · commit 4d32978bd0e5 · run 44544677464 · validator hyperpolymath/standards@857ff096af11

Category Status Pass Fail Indeterminate N/A Since previous revision
K9 contract typecheck 🟢 conformant 1 0 0 0 — no comparable baseline
K9 validator self-test 🟢 conformant 49 0 0 0 — no comparable baseline
K9 live corpus (L0–L2) 🟡 advisory 2 8 (8 advisory) 0 0 — no comparable baseline
K9 live corpus (L0–L2): 8 finding(s) / scope notes
  • .machine_readable/self-validating/examples/setup-repo.k9.ncl — fail (advisory): K9-S007: security flags request capabilities the grant does not cover: net.fetch fs.write process.spawn (default-deny: list them in pedigree.security.capabilities); K9-S009: leash is 'Hunt but no pedigree.signature block is present (presence required here; verificatio
  • .machine_readable/self-validating/methodology-guard.k9.ncl — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-N001: component violates the K9.Component contract: error: missing definition for `schema_version` ┌─ /home/runner/work/
  • .machine_readable/self-validating/template-hunt.k9.ncl — fail (advisory): K9-S003: pedigree.component_type is an unfilled placeholder: 'TODO: describe component type (e.g., 'deployment', 'setup-script')'; K9-S005: pedigree.metadata.name is an unfilled placeholder: 'TODO: component-name'; K9-S007: security flags request capabilities the gran
  • .machine_readable/self-validating/template-kennel.k9.ncl — fail (advisory): K9-S003: pedigree.component_type is an unfilled placeholder: 'TODO: describe component type (e.g., 'build-config', 'metadata')'; K9-S005: pedigree.metadata.name is an unfilled placeholder: 'TODO: component-name'
  • .machine_readable/self-validating/template-yard.k9.ncl — fail (advisory): K9-S003: pedigree.component_type is an unfilled placeholder: 'TODO: describe component type (e.g., 'validated-config', 'schema')'; K9-S005: pedigree.metadata.name is an unfilled placeholder: 'TODO: component-name'
  • container/deploy.k9.ncl — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-S004: pedigree.security.leash is missing; K9-S005: pedigree.metadata.name is missing; K9-S011: component declares a 'recipes' block at l
  • coordination.k9 — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-N001: component does not typecheck against K9.Component: error: unexpected token ┌─ /home/runner/work/trope-checker/trope-checker/.k9-
  • session/custom-checks.k9 — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-N001: component does not typecheck against K9.Component: error: unexpected token ┌─ /home/runner/work/trope-checker/trope-checker/sess

Scope: K9 components L0–L2 against contract v1.0.0 at the named standards commit. L3 signature verification and routed coordination-dialect files are not certified. Green is limited to this scope. Orange is missing evidence; yellow is grandfathered debt or warnings; grey is an explicit scope exclusion. report.json, badge.json and the validator logs are in the k9-grid artifact on the linked run.

Hypatia verdict grid

Hypatia grid green

🟢 clean · commit 4d32978bd0e5 · run 44544677464 · scope: this change (2 file(s))

Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high in grid scope) — reported, never grading the change.

Unique graded findings across gating and advisory rows: 19 (19 reporter observations; 19 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Raw Hypatia alert-derived observations: 43 (code-scanning, Dependabot and secret-scanning; some may also be in SARIF; not an extra total).

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
panic-attack assail advisory 🟡 medium 0 0 1 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
pons asinorum advisory 🟢 clean 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
echidnabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
panicbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
sustainabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
glambot (presentation quality) advisory 🔵 minor 0 0 0 5 — no comparable baseline (no prior PR grid or unreadable snapshot)
seambot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
finishingbot (release readiness) advisory 🔴 high 0 9 4 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
cipherbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
Hypatia scan: 13 finding(s)
  • 13 further finding(s) in files this change does not touch: reported, not graded (0 critical, 1 high).
panic-attack assail: 3 finding(s)
  • medium CommandInjection — scripts/pwg-derive.sh — 83 potentially unquoted variable expansions in scripts/pwg-derive.sh
  • 2 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
echidnabot: not_applicable — proofs here are gated by their own toolchains (proofs.yml: Idris2, Lean, Agda); no ECHIDNA engine is configured, so this adapter could only ever report not_run
  • ⚪ not applicable: proofs here are gated by their own toolchains (proofs.yml: Idris2, Lean, Agda); no ECHIDNA engine is configured, so this adapter could only ever report not_run
rhodibot (RSR compliance): 11 finding(s)
  • 11 further finding(s) in files this change does not touch: reported, not graded (0 critical, 11 high).
panicbot: not_applicable — panic-attack already reports directly as its own row in the Hypatia verdict grid; enrolling panicbot would count the same findings twice
  • ⚪ not applicable: panic-attack already reports directly as its own row in the Hypatia verdict grid; enrolling panicbot would count the same findings twice
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet README)
  • ⚪ not applicable: reserved fleet slot; no adapter exists (gitbot-fleet README)
glambot (presentation quality): 82 finding(s)
  • info GS-001 — Install git-seo for comprehensive SEO analysis: https://github.com/hyperpolymath/git-seo
  • info MACH-007 — ECOSYSTEM.scm not found in .machine_readable/ directory.
  • info MACH-007 — META.scm not found in .machine_readable/ directory.
  • info MACH-007 — STATE.scm not found in .machine_readable/ directory.
  • info MACH-005 — No robots.txt found. Consider adding one for crawler control.
  • 77 further finding(s) in files this change does not touch: reported, not graded (0 critical, 2 high).
seambot: not_applicable — no seam register is declared (spec/seams/seam-register.json)
  • ⚪ not applicable: no seam register is declared (spec/seams/seam-register.json)
finishingbot (release readiness): 127 finding(s)
  • high V1-DOC-ROADMAP.adoc — Required file ROADMAP.adoc not found (Project roadmap).
  • high TOOL-001 — .tool-versions file not found for asdf/mise version management.
  • high SCM-001-NEUROSYM.scm — Required SCM file NEUROSYM.scm not found (Neurosymbolic AI documentation).
  • high SCM-001-AGENTIC.scm — Required SCM file AGENTIC.scm not found (Agentic AI integration documentation).
  • high SCM-001-PLAYBOOK.scm — Required SCM file PLAYBOOK.scm not found (Operational playbooks and procedures).
  • high SCM-001-ECOSYSTEM.scm — Required SCM file ECOSYSTEM.scm not found (Project's place in the ecosystem).
  • high SCM-001-META.scm — Required SCM file META.scm not found (Meta-level information and architectural decisions).
  • high SCM-001-STATE.scm — Required SCM file STATE.scm not found (Project state and progress tracking).
  • high PH-100 — Found 102 placeholders, exceeds maximum allowed (0)
  • medium V1-COM-CONTRIBUTING.md — CONTRIBUTING.md file not found (Contribution guidelines).
  • medium V1-COM-CODE_OF_CONDUCT.md — CODE_OF_CONDUCT.md file not found (Code of conduct).
  • medium V1-SEC-001 — SECURITY.md not found for responsible disclosure.
  • medium TEST-AG-002 — No direct single-line Agda source check was identified in the known workflow or recipe locations. Dynamic runners need separate review; no proof was executed.
  • 114 further finding(s) in files this change does not touch: reported, not graded (0 critical, 1 high).
cipherbot: not_applicable — no cryptography is implemented in this repository; the hashes present are checksum/integrity pins, which cipherbot would report as cryptographic findings
  • ⚪ not applicable: no cryptography is implemented in this repository; the hashes present are checksum/integrity pins, which cipherbot would report as cryptographic findings
accessibilitybot: not_applicable — no served HTML surface; this is a checker library/CLI with AsciiDoc documentation
  • ⚪ not applicable: no served HTML surface; this is a checker library/CLI with AsciiDoc documentation

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

@hyperpolymath
hyperpolymath enabled auto-merge (rebase) November 19, 2026 14:43
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

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.

3 participants