chore: align with governance repo conventions #28

Merged
David merged 1 commit from chore/governance-alignment into main 2026-05-15 03:09:48 +02:00
Owner

Summary

Bring the repo up to par with the standards in governance/CHECKLIST.md, governance/CI.md, and governance/FORGEJO_ORGS.md, copying the patterns already in sibling Pandora's Box / NiceGuyIT repos (youtrack-cli, monkey, binaries).

CI workflows

  • check.yml: add Swatinem/rust-cache@v2 (per CI.md:106, "the single biggest win on cold check runs"), add the rustup component add clippy rustfmt step, and switch cargo test --lib to cargo test since this crate has no library target.
  • build-oci-image.yml: full rewrite to the youtrack-cli pattern. Use vars.RUNS_ON_OPENSUSE_BASE_LATEST, set up a docker-container buildx builder, compute versioned tags from oci-build/get-tags.nu, pass GIT_SHA / BUILD_DATE / CARGO_BUILD_JOBS as build-args (replacing the hard-coded latest-only publish), publish a SHA-256 sidecar, and authenticate with secrets.FORGEJO_PAT. The workflow now also triggers on v* tags and is path-scoped.
  • release.yml: switch to vars.RUNS_ON_OPENSUSE_BASE_LATEST and remove a stray em-dash.
  • create-release.yml: remove a stray em-dash.

oci-build/

  • New oci-build/get-tags.nu mirroring the canonical sibling version: maps git describe output to [<tag>, latest] or [latest].
  • oci-build/Dockerfile: rename the artifact stage to export (per CHECKLIST.md:48 builder/runtime/export convention), wire BuildKit cache mounts on /usr/local/cargo/{registry,git}, add org.opencontainers.image.source LABEL pointing at the current Pandora's Box org (FORGEJO_ORGS.md move-mechanics step 3), and rename GIT_HASH build-arg to GIT_SHA (CHECKLIST.md:8).
  • oci-build/build.nu: track the rename and switch to docker buildx build --target export.

Internal alignment

  • Cargo.toml: add repository = "https://dev.a8n.run/pandoras-box/explorer-bookmarks" (FORGEJO_ORGS.md move-mechanics step 2).
  • Cargo.lock: refresh to match the package version (stale from a prior bump).
  • build.rs / src/main.rs: rename GIT_HASH -> GIT_SHA for symmetry with the build-arg.
  • LICENSE -> LICENSE.md (CHECKLIST.md:17).
  • justfile: add check-fmt, check-clippy, check-build, check-docker, test, lint; make check the umbrella recipe per the checklist. SaaS-only recipes (compose, migrate, ensure-env) remain N/A for a Windows CLI.
  • build.rs: re-run through rustfmt 1.8.0 to satisfy the new check.yml formatting step.
  • src/main.rs test helper make_valid_config(): add the missing autosave_task_name / autosave_interval fields. Without this fix cargo test does not compile - it had been broken since the auto-save feature landed.

Out of scope

  • governance/FORGEJO_ORGS.md:41 still lists this repo under NiceGuyIT, but the repo lives in Pandora's Box. That row should move and the tallies should be updated, but it is a change in the governance repo and belongs in a separate PR.

Test plan

  • cargo fmt --check clean
  • cargo clippy --all-targets -- -D warnings clean
  • cargo build --all-targets clean
  • cargo test -> 36 passed
  • docker buildx build --target export ... --file oci-build/Dockerfile . produces a 1.5 MB Windows .exe
  • nu oci-build/get-tags.nu --joined -> v0.3.3,latest
  • Watch the first post-merge Build Windows binary run on Forgejo and confirm the binary lands at https://dev.a8n.run/api/packages/pandoras-box/generic/explorer-bookmarks/{v0.3.3,latest}/explorer-bookmarks-x86_64.exe together with the .sha256 sidecar.
  • Confirm Check workflow stays green on the new runner config.
## Summary Bring the repo up to par with the standards in `governance/CHECKLIST.md`, `governance/CI.md`, and `governance/FORGEJO_ORGS.md`, copying the patterns already in sibling Pandora's Box / NiceGuyIT repos (`youtrack-cli`, `monkey`, `binaries`). ### CI workflows - `check.yml`: add `Swatinem/rust-cache@v2` (per `CI.md:106`, "the single biggest win on cold check runs"), add the `rustup component add clippy rustfmt` step, and switch `cargo test --lib` to `cargo test` since this crate has no library target. - `build-oci-image.yml`: full rewrite to the `youtrack-cli` pattern. Use `vars.RUNS_ON_OPENSUSE_BASE_LATEST`, set up a `docker-container` buildx builder, compute versioned tags from `oci-build/get-tags.nu`, pass `GIT_SHA` / `BUILD_DATE` / `CARGO_BUILD_JOBS` as build-args (replacing the hard-coded `latest`-only publish), publish a SHA-256 sidecar, and authenticate with `secrets.FORGEJO_PAT`. The workflow now also triggers on `v*` tags and is path-scoped. - `release.yml`: switch to `vars.RUNS_ON_OPENSUSE_BASE_LATEST` and remove a stray em-dash. - `create-release.yml`: remove a stray em-dash. ### oci-build/ - New `oci-build/get-tags.nu` mirroring the canonical sibling version: maps `git describe` output to `[<tag>, latest]` or `[latest]`. - `oci-build/Dockerfile`: rename the `artifact` stage to `export` (per `CHECKLIST.md:48` builder/runtime/export convention), wire BuildKit cache mounts on `/usr/local/cargo/{registry,git}`, add `org.opencontainers.image.source` LABEL pointing at the current Pandora's Box org (`FORGEJO_ORGS.md` move-mechanics step 3), and rename `GIT_HASH` build-arg to `GIT_SHA` (`CHECKLIST.md:8`). - `oci-build/build.nu`: track the rename and switch to `docker buildx build --target export`. ### Internal alignment - `Cargo.toml`: add `repository = "https://dev.a8n.run/pandoras-box/explorer-bookmarks"` (`FORGEJO_ORGS.md` move-mechanics step 2). - `Cargo.lock`: refresh to match the package version (stale from a prior bump). - `build.rs` / `src/main.rs`: rename `GIT_HASH` -> `GIT_SHA` for symmetry with the build-arg. - `LICENSE` -> `LICENSE.md` (`CHECKLIST.md:17`). - `justfile`: add `check-fmt`, `check-clippy`, `check-build`, `check-docker`, `test`, `lint`; make `check` the umbrella recipe per the checklist. SaaS-only recipes (compose, migrate, ensure-env) remain N/A for a Windows CLI. - `build.rs`: re-run through `rustfmt 1.8.0` to satisfy the new `check.yml` formatting step. - `src/main.rs` test helper `make_valid_config()`: add the missing `autosave_task_name` / `autosave_interval` fields. Without this fix `cargo test` does not compile - it had been broken since the auto-save feature landed. ### Out of scope - `governance/FORGEJO_ORGS.md:41` still lists this repo under NiceGuyIT, but the repo lives in Pandora's Box. That row should move and the tallies should be updated, but it is a change in the governance repo and belongs in a separate PR. ## Test plan - [x] `cargo fmt --check` clean - [x] `cargo clippy --all-targets -- -D warnings` clean - [x] `cargo build --all-targets` clean - [x] `cargo test` -> 36 passed - [x] `docker buildx build --target export ... --file oci-build/Dockerfile .` produces a 1.5 MB Windows `.exe` - [x] `nu oci-build/get-tags.nu --joined` -> `v0.3.3,latest` - [ ] Watch the first post-merge `Build Windows binary` run on Forgejo and confirm the binary lands at `https://dev.a8n.run/api/packages/pandoras-box/generic/explorer-bookmarks/{v0.3.3,latest}/explorer-bookmarks-x86_64.exe` together with the `.sha256` sidecar. - [ ] Confirm `Check` workflow stays green on the new runner config.
chore: align with governance repo conventions
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 1m2s
Create release / Create release from merged PR (pull_request) Has been skipped
cf627ae3a3
Bring the repo up to par with the standards in governance/CHECKLIST.md, governance/CI.md, and governance/FORGEJO_ORGS.md, mirroring the patterns in sibling Pandora's Box / NiceGuyIT repos (youtrack-cli, monkey, binaries).

CI workflows: switch build-oci-image.yml and release.yml to the shared RUNS_ON_OPENSUSE_BASE_LATEST runner var, replace the hard-coded `latest`-only publish with versioned tags from oci-build/get-tags.nu, add a docker-container buildx builder, GIT_SHA / BUILD_DATE / CARGO_BUILD_JOBS build-args, and a SHA-256 sidecar. Add Swatinem/rust-cache@v2 and rustup component setup to check.yml.

Dockerfile: rename the `artifact` stage to `export` (CHECKLIST naming), wire BuildKit cache mounts to the cargo registry/git dirs, add org.opencontainers.image.source LABEL pointing at the current Pandora's Box org, and rename the GIT_HASH build-arg to GIT_SHA (org-wide standard).

Internal alignment: rename GIT_HASH to GIT_SHA across build.rs / main.rs / build.nu, add the missing Cargo.toml repository field, rename LICENSE -> LICENSE.md, add governance-checklist justfile recipes (check-fmt / check-clippy / check-build / check-docker / test / lint with check as the umbrella), and apply rustfmt 1.8.0's formatting to build.rs. Fix the make_valid_config test helper which was missing autosave_task_name / autosave_interval after the auto-save feature landed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
David merged commit 30f7bb4a68 into main 2026-05-15 03:09:48 +02:00
David deleted branch chore/governance-alignment 2026-05-15 03:09:48 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pandoras-box/explorer-bookmarks!28
No description provided.