Skip to content

chore: adopt devkit baseline (CI, security, Claude rules) + fix 2 type errors - #10

Merged
RickCogley merged 1 commit into
mainfrom
feat/devkit-baseline
Apr 29, 2026
Merged

chore: adopt devkit baseline (CI, security, Claude rules) + fix 2 type errors#10
RickCogley merged 1 commit into
mainfrom
feat/devkit-baseline

Conversation

@RickCogley

Copy link
Copy Markdown
Owner

Summary

Implements the punch list from #8. Closes #8.

Hibana publishes to deno.land/x (not JSR) — per project memory and the README, JSR is intentionally not used because Lume's dev resists JSR (no http imports support), and hibana follows Lume's hosting choice. So no publish.yml here. The deno.land/x webhook handles publish on tag push.

What's in this PR

CI / Security (none previously)

File Role
.github/workflows/ci.yml fmt + lint + check on PR/main pushes
.github/workflows/security.yml wrapper triggering vendored security scan
.github/workflows/secrets-and-sast-vendored.yml 451-line copy of devkit's reusable workflow (vendored because hibana is public + cross-org)
.github/dependabot.yml weekly github-actions + npm (docs-site) updates

Claude tooling

  • .claude/rules/change-management.md (copy from devkit shared-rules; adapted to mention deno.land/x publishing flow)
  • .gitignore updated to allow tracking .claude/rules/ (was ignoring all of .claude/)

Type-error fixes

Two pre-existing type errors fixed (both same root cause):

  • processors/vento_heading_anchors.ts:120
  • processors/vento_toc.ts:163

Both had Required<...Options> annotations on options merging, but containerSelector is genuinely optional (undefined means "scan whole document"). Aligned the annotations to Pick out containerSelector as optional, matching the existing pattern in the corresponding defaults declarations.

Deno hygiene

  • Drop name: "@rick/hibana" from deno.json — JSR-style scope but hibana doesn't publish to JSR (verified: jsr.io 404). Field was misleading about the publish target.
  • Add preflight task.
  • Scope the check task to deno check mod.ts instead of deno check **/*.ts — the glob picked up docs-site/ Astro internals and root-level scripts and produced 11k+ unrelated errors. mod.ts is the public entry point.
  • Commit deno.lock for reproducibility (was untracked; both global and project gitignore had been ignoring it).
  • .gitignore overrides for !deno.lock (global ignores it) and !.github/workflows/*secret* (global pattern matches the vendored filename).

Tests deliberately not in CI yet

CI is fmt + lint + check only — deno test is not in the workflow because 7 tests fail on main of v1.3.0 (pre-existing, not caused by this PR). All seven are in:

  • preprocessors/__tests__/language_alternates_schema.test.ts (4 failing)
  • preprocessors/__tests__/markdown_metadata.test.ts (3 failing)

All fail with AssertionError: Values are not equal — looks like value drift after recent upgrades.

Tracked in #9 (with acceptance criteria including re-enabling deno test in ci.yml once they're fixed).

Out of scope (flagged in commit message)

Test plan

  • deno fmt --check passes
  • deno lint passes
  • deno check mod.ts passes (was failing with 2 errors on main; this PR fixes them)
  • deno test --allow-read --unstable-temporal — 13 passed, 7 failing pre-existing (tracked in test: 7 pre-existing test failures in preprocessors (likely upgrade drift) #9)
  • CI workflow runs green on this PR
  • Security workflow runs green (first SAST/secrets/SBOM run for hibana)

InfoSec: brings continuous SAST + secret scanning + SBOM coverage to a repo that previously had zero security automation. The 2 type-error fixes are correctness improvements (avoid undefined access on options.containerSelector later in the code).

…e errors

Implements the punch list from issue #8.

== CI/CD (none previously) ==

- .github/workflows/ci.yml: fmt + lint + check (mod.ts) on PR/main
  pushes. Tests intentionally NOT in CI right now — 7 pre-existing
  test failures on main predate this PR (AssertionError in
  language_alternates_schema and markdown_metadata test files).
  Tracking separately to keep this PR scope-bounded.
- .github/dependabot.yml: weekly github-actions + npm (docs-site)
  updates.

NO publish.yml — hibana publishes to deno.land/x via webhook on tag
push (not JSR). Per project memory, JSR is intentionally not used
because Lume's dev resists JSR (no http imports support), and hibana
follows Lume's hosting choice.

== Security ==

- .github/workflows/security.yml: wrapper triggering local vendored
  workflow on push/PR/weekly cron/dispatch.
- .github/workflows/secrets-and-sast-vendored.yml: 451-line copy of
  eSolia/devkit/.github/workflows/secrets-and-sast.yml@main as of
  2026-04-29. Vendored because hibana is public + cross-org from
  eSolia/devkit (private) — GitHub blocks public consumers from
  calling private reusable workflows AND blocks cross-org private
  calls. Same vendored pattern as RickCogley/pub-cogley,
  RickCogley/tedasuke, eSolia/marquis.

== Claude tooling ==

- .claude/rules/change-management.md: copy of devkit's shared rule.
  Also fixed .gitignore to allow tracking .claude/rules/ (was
  ignoring all of .claude/).

== Type-error fixes (2 from main) ==

- processors/vento_heading_anchors.ts:120 and processors/vento_toc.ts:163
  both had `Required<...Options>` annotations on options merging,
  but `containerSelector` is genuinely optional (undefined means
  "scan whole document"). Aligned the annotations to Pick out
  containerSelector as optional, matching the existing pattern in
  the corresponding `defaults` declarations.

== Deno hygiene ==

- Drop misleading `name: "@rick/hibana"` from deno.json — JSR-style
  scope but hibana doesn't publish to JSR (verified: jsr.io 404 for
  this name). Field was confusing readers about the publish target.
- Add `preflight` task: deno fmt && deno check mod.ts && deno lint.
- Scope the `check` task to `deno check mod.ts` instead of
  `deno check **/*.ts` — the glob picked up docs-site/ Astro
  internals and root-level scripts and produced 11k+ unrelated
  errors. mod.ts is the public entry point and what JSR-style
  consumers care about.
- Commit deno.lock for reproducibility (was untracked on main; both
  global and project .gitignore had been ignoring it).
- .gitignore overrides for `!deno.lock` (global gitignore_global
  ignores) and `!.github/workflows/*secret*` (global pattern matches
  the vendored filename).

== Out of scope (flagged for follow-up) ==

- Fix the 7 failing tests in language_alternates_schema and
  markdown_metadata. The user has confirmed they were not aware of
  these — likely surfaced by recent upgrades. Will be tracked in a
  separate issue.
- Remove `no-explicit-any` lint exclusion and fix the ~18 `any`
  usages (real cleanup work, not baseline scope).
- Move root-level scripts (release.ts, generate_readme.ts,
  generate_readme2.ts, update_lume_version.ts) into scripts/.
- Investigate whether generate_readme2.ts is dead code.

Closes #8

InfoSec: brings continuous SAST + secret scanning + SBOM coverage
to a repo that previously had zero security automation. The 2 type
errors fixed are correctness improvements (avoids potential undefined
access on `options.containerSelector` later in the code, though the
runtime checks at usage sites already guard).
@RickCogley
RickCogley merged commit 6e8b9c7 into main Apr 29, 2026
7 checks passed
@RickCogley
RickCogley deleted the feat/devkit-baseline branch April 29, 2026 12:23
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.

chore: adopt devkit baseline (CI, security, Claude tooling)

1 participant