CI and public release-engineering foundation (Forgejo development CI, GitHub release pipeline) #97
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router#97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Establish the CI and public release-engineering foundation for Scarcity Router before substantial implementation of the execution-gateway modules proceeds.
The repository must have:
This issue establishes infrastructure and contracts. It does not perform a public release and must not pretend that server images, Windows workers or other not-yet-implemented artifacts already exist.
Context
Scarcity Router is an independent Apache-2.0 OSS project.
Canonical repository:
https://forgejo.creatidy.com/BioMedical-IT/scarcity-routerPublic read-only mirror:
https://github.com/creatidy/scarcity-routerDevelopment authority:
Public distribution surface:
Normal development flow:
Stable release flow:
mainmust remain stable and human-controlled. Development PRs must not automatically promote tomain.Architecture foundation issue #85 is complete and merged.
This issue should land before substantial implementation of #86–#95.
Issue #95 remains responsible for polished distribution, installation, upgrade, uninstall and end-to-end user experience. It must build on this foundation rather than becoming the first place where CI/CD architecture is introduced.
Principles
Prefer:
Avoid building a deployment platform.
CI and release jobs must not require:
Use deterministic tests and synthetic/redacted fixtures.
Treat pull-request code as untrusted.
PR jobs must not receive publishing credentials or broadly privileged runner access.
Do not expose:
to normal PR CI.
Scope
1. Forgejo development CI
Introduce Forgejo Actions under:
Development CI must run at minimum:
Use a stable required-check/job name suitable for branch protection.
Run the repository's authoritative validation gate, currently equivalent to:
Do not duplicate repository policy by manually maintaining a different test set inside the workflow where an existing Makefile/project command is authoritative.
Use appropriate concurrency/cancellation so superseded PR runs do not unnecessarily consume runner capacity.
Keep permissions minimal.
Third-party Actions should be minimized and pinned/versioned appropriately for a supply-chain-sensitive OSS workflow.
2. Package build/install validation
CI must validate the distributable Python package, not only the source checkout.
At minimum:
Then verify the produced wheel from a clean environment.
The smoke test must demonstrate that the installed package and its public console commands can start/import correctly without relying on the source tree.
The validation should catch problems such as:
Do not publish anything from PR CI.
3. Development CI security contract
Document the trust model for CI.
At minimum freeze that:
If the current Forgejo deployment requires trusted/self-hosted runners, document the minimum safe runner boundary and any owner-side hardening required.
Do not solve this by granting PR jobs broad host access.
4. Branch-protection contract
Define the CI status/check that should be required for merging to
develop.Repository code/documentation should contain enough stable information that branch protection does not depend on an accidental workflow/job name.
If actual Forgejo branch-protection configuration is outside repository authority or requires owner/admin action, record the exact required setting as an explicit owner action instead of silently claiming it is configured.
Do not modify
mainpromotion policy in this issue.5. Release/versioning contract
Document and implement the release invariants.
Public releases originate only from stable
main.A release workflow must fail closed unless all applicable conditions hold:
vX.Y.Z;main;Do not automatically bump versions or automatically promote
developtomain.Do not release arbitrary development commits.
Release tags are intentional human-controlled actions.
6. GitHub public release workflow
Add the GitHub Actions release workflow under:
GitHub should not become a second full development-CI authority.
Do not add duplicate GitHub PR CI merely because GitHub Actions exists.
The primary GitHub workflow should be release-oriented and triggered by the deliberate release-tag path.
It must use full enough Git history to verify the release commit against
main.7. Python release artifacts
For the currently existing Python package, prepare the release path for:
The release workflow should:
Prefer PyPI Trusted Publishing / OIDC.
Do not introduce a long-lived PyPI API token when Trusted Publishing is available.
External PyPI project/trusted-publisher configuration that cannot be represented in Git should be documented as an explicit owner setup step.
Creating the workflow must not itself publish a package or create a release.
8. Integrity and provenance
Generate at minimum:
for public release artifacts.
Where practical with the current GitHub public repository and workflow model, add GitHub artifact attestations / Sigstore-compatible build provenance using short-lived identity/OIDC rather than persistent signing secrets.
If some provenance mechanism cannot yet be enabled without external owner configuration, implement the repository side and document the exact remaining gate.
Do not add complicated bespoke signing infrastructure merely to satisfy this issue.
9. GHCR foundation
Define the release contract for future server OCI images.
Expected eventual image namespace:
Expected release tags eventually include:
latestmeans the latest stable release, never arbitrarydevelop.Prefer:
when the actual server image supports and justifies multi-architecture builds.
However:
Do not invent a production server image or fake a successful GHCR publishing job if the repository does not yet contain the required production container artifact.
The foundation should make the future insertion point and release contract explicit. Actual image publication should activate only when a real supported image exists.
Use GitHub's short-lived workflow identity / repository token where appropriate rather than introducing permanent registry credentials.
10. Windows worker release contract
Record the eventual public artifact contract:
Windows artifacts must eventually be built on Windows runners.
MSIX remains the preferred main installation direction, subject to implementation evidence.
Portable ZIP may be provided for testing/diagnostics.
Code signing is part of reaching professional public-release quality.
But no Windows worker exists yet.
Therefore this issue must not:
Record the release contract and the future workflow insertion point only where implementation does not yet exist.
11. Linux/Python installation contract
For the existing Python component, the intended initial public Linux/WSL installation path is:
with:
as a conventional alternative after PyPI publication exists.
Do not build or host custom:
A Homebrew tap may be considered later but is not required here.
Do not confuse Python-package distribution with eventual native Linux-worker packaging.
12. Documentation
Update the appropriate repository documentation to explain:
Documentation must distinguish clearly between:
Non-goals
develop -> mainpromotion.develop.Relationship to existing program
This issue follows the merged architecture foundation #85.
It provides infrastructure used by later implementation issues but should not redefine their architecture.
In particular:
Do not move product implementation from those issues into this one.
Do not add new dependency cycles to the #85–#95 program.
Acceptance criteria
develop.develop.developbranch protection is defined.mainancestry and exact-commit artifact provenance.SHA256SUMSis generated.uv tool/pipx; no custom apt/RPM/pacman repository is introduced.develop, one PR targetingdevelop, left open for human review.Validation
At minimum run:
Also execute the new clean-install package smoke test through the same mechanism that CI will use.
Where workflow syntax cannot be executed locally, validate it using the most appropriate deterministic tooling available and inspect the workflow permissions/triggers manually.
Security considerations
The most important trust boundary is:
No path from an ordinary PR should grant publication authority or access to provider/private-infrastructure secrets.
Use narrowly scoped ephemeral identities for publication where supported.
Release jobs must build the artifact they publish from the exact verified release commit.
Deliverable
One PR to
developcontaining the minimal CI/release-engineering foundation described above.Leave it open for human review.
Do not merge it and do not publish a release.
Closeout (v0.1.0 release-readiness reconciliation, 2026-09-21). The CI and public release-engineering foundation (D-046,
docs/release-engineering.md) is implemented and operating; every repository-side acceptance criterion is satisfied..forgejo/workflows/ci.yml, workflowci, jobcheck) exists, runs on every PR todevelopand every push todevelop, executes the authoritative gate (uv sync --only-dev,make check,uv run basedpyright,git diff --check) plusmake package-check, withcontents: readonly, pinned-by-SHA actions, per-ref concurrency cancellation, and no secrets anywhere in the path. It is not just defined — it has been running green on this infrastructure (runs #16–#25, latest ondevelop@9d6192e, 11m46s, success).make package-checkbuilds wheel+sdist, inspects contents/metadata, and smoke-installs the wheel into a throwawayuv toolenvironment (four console scripts, packaged resources, MCP discovery, loopback REST healthz) — catching missing package data, broken entry points, undeclared dependencies and repository-relative assumptions..github/workflows/release.yml(verifyjob): strict SemVer tag, package version equality from the single__version__literal, tagged-commit ancestry in stablemain, exact-commit artifact builds,make package-checkbefore any publication; GitHub hosts exactly one tag-driven workflow and no duplicate development CI; no PR event can trigger release and PR code receives no release secrets;SHA256SUMScovers wheel/sdist/worker-zip and is re-verified and attested with final bytes; PyPI input is structurally restricted to*.whl/*.tar.gzvia separate artifact upload plus a guard step; publication uses only short-lived OIDC (Trusted Publishing) — no long-lived token exists.developbranch protection requiring thecheckstatus, PyPI Trusted Publisher entry, GitHubpypienvironment with reviewers. The runner itself is now demonstrably operating; the remaining items stay recorded indocs/release-engineering.md.Validation: full gate green (1868 tests, basedpyright clean, package-check green); workflow YAML re-inspected manually per the documented discipline. Closing as complete;
docs/roadmap.mdrecords the foundation as in place.