From 7feaa9d41f7ff17c7a0f2f834d5163c856563c4f Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sun, 11 Oct 2026 14:40:58 +1100 Subject: [PATCH] docs(wiki): restore release guide for SHA-1 migration --- Home.md | 58 +++++++++++++++++++++++- Migration-to-Gitea.md | 59 +++++++++++++++++++++++++ Project-Tracking.md | 51 +++++++++++++++++++++ Release-Process.md | 100 ++++++++++++++++++++++++++++++++++++++++++ Road-to-1.0.md | 48 ++++++++++++++++++++ Staging-and-QA.md | 60 +++++++++++++++++++++++++ _Sidebar.md | 8 ++++ 7 files changed, 383 insertions(+), 1 deletion(-) create mode 100644 Migration-to-Gitea.md create mode 100644 Project-Tracking.md create mode 100644 Release-Process.md create mode 100644 Road-to-1.0.md create mode 100644 Staging-and-QA.md create mode 100644 _Sidebar.md diff --git a/Home.md b/Home.md index 5d08b7b..2f4c20b 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,57 @@ -Welcome to the Wiki. \ No newline at end of file +# Archie development and release guide + +This guide is the working plan for moving Archie into private development on Gitea and establishing reliable releases. It records the decisions made on 11 October 2026. The procedures described as planned still need implementation; they are not claims that the pipeline exists today. + +The objective is a repeatable path from a selected commit to a verified installation. Computers build, install, test, collect evidence, and recover. Sam decides product scope, accepts known limitations, and approves deployment to production. + +## Start here + +Work through these pages in order. Each has completion criteria so the next step starts from evidence. + +1. [Finish the Gitea migration](Migration-to-Gitea): establish the development checkout, private distribution, working runners, and the new release baseline. +2. [Set up project tracking](Project-Tracking): review the existing backlog and make Gitea the authoritative tracker. +3. [Build staging and QA](Staging-and-QA): rehearse installation, upgrades, real workflows, and recovery. +4. [Implement the release process](Release-Process): build a candidate once, validate it, deploy it, and publish it as stable after verification. +5. [Define the first supported product release](Road-to-1.0): set a useful, maintainable product boundary and earn the 1.0 designation. + +The migration and tracking setup can progress together. A stable release depends on working private artifact distribution, staging QA, and production verification. + +## Decisions already made + +| Decision | Direction | +|---|---| +| Development forge | Private `sam/archie` on Gitea | +| Git object format | SHA-1, retaining original commit IDs and signatures | +| Historical reference | Original SHA-1 history retained separately | +| Release numbering | New `0.x` series, beginning with `0.1.0` | +| Product maturity | `1.0.0` will represent a defined supported product | +| Project management | Move from Beads to Gitea issues, milestones, and a project board | +| Release quality | Validate the packaged artifacts in staging, then verify deployment | +| Automation | Human approval; automated execution and evidence collection | + +Future licensing and commercial terms remain a separate decision. Repository privacy does not revoke the Apache 2.0 rights attached to previously published versions. + +## Verified migration results + +The recreated Gitea repository is private and uses SHA-1. The original history was restored from `/work/apps/archie-core`, retaining all 2,362 commits reachable from its 19 local branches, their original IDs, and existing commit signatures. Historical release tags are excluded from the new repository so the new `0.x` release series can start independently. + +The earlier SHA-256 conversion was reversed by restoring the original repository, rather than converting the rewritten objects back. No new commits were found on the converted local branches. The original `main` at restoration was `3066c3b02f306ed794924dbc60145a4d0eb7f1c2`; this is a historical checkpoint, not a promise about future branch tips. + +The guide was preserved locally when the repository and wiki were recreated. The active wiki clone is SHA-1 too. The SHA-256 clones remain as local archives and should not receive new development work. + +Local locations: + +- Development checkout: `/work/apps/archie-sha1`, with `origin` pointing to Gitea. +- Original checkout: `/work/apps/archie-core`. +- Wiki checkout: `/work/apps/archie.wiki`. +- Archived SHA-256 code checkout: `/work/apps/archie-sha256`. +- Archived SHA-256 wiki checkout: `/work/apps/archie.wiki-sha256`. +- Original refs bundle and conversion evidence: `/work/apps/archie-sha256/.git/migration`. + +Runner workflows, private distribution, project tracking, staging QA, and release automation still require implementation. The repository-format reversal does not change that plan. + +## How to maintain this guide + +Use Gitea issues for executable work and this wiki for the agreed process. Update repository instructions and `RELEASING.md` alongside implementation so agents and automation follow the same rules. When a process fails, fix the smallest concrete cause and update the relevant procedure. + +A release is complete when the intended artifacts are running, the required QA passed, and the production checks passed. Publishing files alone does not meet that definition. diff --git a/Migration-to-Gitea.md b/Migration-to-Gitea.md new file mode 100644 index 0000000..3ca682b --- /dev/null +++ b/Migration-to-Gitea.md @@ -0,0 +1,59 @@ +# Finish the Gitea migration + +[Guide home](Home) · [Next: project tracking](Project-Tracking) + +The original SHA-1 history has been restored and pushed. The remaining migration is the development workflow, distribution, and tooling around the repository. + +## 1. Establish the development home + +Use `sam/archie` and `/work/apps/archie-sha1` for new work. The checkout's `origin` already points to Gitea. `/work/apps/archie` contained existing files and was not overwritten. + +Retain the original checkout and backup. Copy the original refs bundle to independent backup storage; `.git/migration` in the archived SHA-256 checkout is local evidence and is not included in an ordinary clone. Review the 19 preserved branches and retain the ones that still contain intended work. Decide branch cleanup explicitly after that review. + +Treat the old GitHub and Gitea repositories as historical references. Disable superseded automatic publishing and unintended mirroring. Verify their visibility separately before treating them as private archives. Confirm repository and backup restoration works before deleting any historical data. + +A repository rename does not require an immediate rename of Go import paths or service binaries. Keep those changes separate unless a consumer actually requires them. + +**Complete when:** a fresh SHA-1 clone is the routine development checkout, active branches are understood, backups are independently recoverable, and superseded publication is disabled. + +## 2. Reconnect runners and establish one quality gate + +Identify whether the existing runners serve Gitea Actions or another CI system such as Woodpecker. Use the system already operating reliably. Inspect its version, labels, checkout implementation, Docker access, and credentials before porting workflows. + +The migrated tree currently contains GitHub workflows, with no Gitea or Woodpecker workflow files. Their comments about an existing Gitea mirror are not evidence of a working pipeline. + +Keep the check definitions in the Taskfile. The standard gate is `task check`; release validation must additionally run the existing `task test:full` and the release QA described in this guide. Maintain one definition for each check and invoke it from CI. The current deploy workflow maintains a different inline gate, which must be consolidated during the port. + +First prove that a runner can clone the recreated repository, check out the selected commit, build, and run the standard gate. Then exercise Archie's actual Git paths: clone/fetch, worktree creation, changes, daemon-owned commit, push, and forge integration. A clone check alone does not cover these operations. + +Use caches to shorten repeated work, but retain an uncached release test. Install pinned tool versions and use lockfiles. Record stage durations before optimising further. Give release builds and promotions appropriate concurrency limits so they do not exhaust the runners or race each other. + +**Complete when:** a fresh runner can execute the authoritative gate and the application can perform its required Git operations against the recreated Gitea repository. + +## 3. Make distribution private and usable + +Inventory every publishing destination: release attachments, container images, CI artifacts, generated documentation, and source mirrors. In particular, check the visibility of the existing GHCR packages independently of GitHub repository visibility. Download counts alone do not identify who downloaded an image. + +Choose Gitea release storage and a private container registry accessible to staging and production. Establish separate CI publishing credentials and read-only deployment credentials. Verify authenticated downloads and pulls from the actual deployment environment, and confirm unauthenticated access is denied. + +Update image destinations, release metadata, installer downloads, update discovery, release-note links, and deployment documentation together. The current updater discovers releases from a hard-coded GitHub API URL without authentication. The installer exposes `ARCHIE_SOURCE_URL` and `ARCHIE_RELEASE_BASE_URL`, but changing URLs alone does not establish authenticated private downloads. + +Keep task-scoped agent credentials separate from host deployment and registry credentials. Never solve private artifact access by placing the daemon's credentials in agent containers. + +**Complete when:** CI can publish privately, deployment can read privately, update discovery finds the intended Gitea release, and no required path depends on unauthenticated access to the old private GitHub repository. + +## 4. Establish the new release baseline + +Start the new series at `0.1.0`. Keep historical `1.x` release tags and assets out of the new release feed. The updater currently chooses the highest semantic version, so mixing the two series would select historical `1.x` releases. + +Retain historical changelog material as reference and make the new series clear in the changelog and generated release pages. Give the release-note generator an explicit baseline for the new series: with no preceding release tag, the existing script would consider the entire history. Test the first-release path before tagging anything. + +Switch the existing installation explicitly to the new release source and candidate version. Verify preservation of data, configuration, accepted work, and image policy. Product version numbering must not reset database migration history. + +**Complete when:** previewing `0.1.0` produces intentional notes, update discovery selects the new series, and a rehearsal can transition the existing installation without data loss. + +## 5. Update the operating instructions + +Replace Beads-specific workflow instructions only after the tracker transition. Update `AGENTS.md`, relevant skills or hooks, CI instructions, installation documentation, and `RELEASING.md` to match the implemented Gitea process. Identify local hooks tied to the old checkout; avoid copying absolute paths blindly. + +**Migration acceptance:** clean clone → authoritative gate → private candidate artifacts → authenticated staging installation → representative workflow completed. Track each remaining section as a Gitea issue with its completion evidence. diff --git a/Project-Tracking.md b/Project-Tracking.md new file mode 100644 index 0000000..b190d11 --- /dev/null +++ b/Project-Tracking.md @@ -0,0 +1,51 @@ +# Project tracking in Gitea + +[Guide home](Home) · [Previous: migration](Migration-to-Gitea) · [Next: staging and QA](Staging-and-QA) + +Gitea will become the authoritative tracker. The change is complete only when the development instructions and agents use it too. + +## Review the backlog before importing it + +Export and retain the existing Beads data, dependencies, and any durable project memories. Retain old forge issues for reference. The export is a historical backup, not a second live tracker. + +Review open work against the current tree. Create a Gitea issue only if the problem still exists or the feature is still intended. Record old IDs where useful for tracing context. Bring across real blockers and acceptance criteria. Avoid importing completed work as open tasks or preserving speculative plans as commitments. + +There may be useful project conventions in Beads memories. Move the ones still applicable into the appropriate repository instructions or wiki page before retiring hooks that load them. + +## Use one project board + +| Column | Meaning | +|---|---| +| Planned | Still intended; not being implemented | +| Implementing | Someone is actively changing it | +| Ready for QA | Implementation and standard gate are complete | +| Verified in staging | The packaged candidate demonstrated the required behaviour | +| Released | Production verification recorded for the release carrying the change | + +A closed implementation issue can be associated with a release whose deployment is still pending. Keep implementation completion and release completion distinct; record the version and release issue rather than forcing every issue through identical deployment work. + +Start with a small label set: `bug`, `feature`, `release`, `infrastructure`, and `blocked`. A milestone describes a bounded outcome. Use separate milestones for completing the private release pipeline, releasing `0.1.0`, and reaching the supported product boundary for `1.0.0`. + +## Keep each issue concrete + +Every implementation issue needs: + +- The observed problem or wanted behaviour. +- The smallest complete scope. +- Any dependency that actually blocks it. +- Acceptance criteria stated as observable behaviour. +- Completion evidence and the commit or release carrying it. + +Avoid putting credentials or private operational details in reusable issue templates. Link restricted operational records where needed. + +## Create a release issue for each candidate + +The release issue is the place to assemble scope, evidence, approval, deployment outcome, and recovery outcome. Use the template in [the release process](Release-Process). + +Sam owns the decision to promote. The pipeline owns the execution and attaches its evidence. An agent can prepare notes and investigate failures, but it must not substitute an unsupported assertion for QA evidence. + +## Complete the tracker cutover + +Once the reviewed backlog is in Gitea, update repository instructions and agent workflows so they create, claim, and close Gitea issues. Remove obsolete Beads hooks and synchronization jobs from the active workflow. Preserve the historical data. + +**Complete when:** a real piece of work can be planned, implemented, reviewed, and closed entirely through Gitea, and no required instruction still routes it through Beads. diff --git a/Release-Process.md b/Release-Process.md new file mode 100644 index 0000000..4bb6720 --- /dev/null +++ b/Release-Process.md @@ -0,0 +1,100 @@ +# Automated release process + +[Guide home](Home) · [Previous: staging and QA](Staging-and-QA) · [Next: road to 1.0](Road-to-1.0) + +This is the target process. The migrated repository still has the previous GitHub-oriented publishing workflow; these stages must be implemented before they become operating instructions. + +**Select candidate → validate source → build artifacts → stage and run QA → approve → deploy → verify production → publish stable.** + +A successful release means the selected artifacts are running and verified. Publication is one stage of that result. + +## 1. Select and freeze the candidate + +Choose a bounded scope, intended version, and exact commit. Finish release notes before building so the notes and artifacts describe the same source. One version covers all five host services and the agent image. + +Use `0.1.0` for the first new release. Reserve `1.0.0` until the product criteria are met. Once a version is assigned to a candidate, retain its identity and evidence. If a source fix is needed, create a new candidate with a new version rather than moving an existing tag or replacing its assets. + +A tag identifies source; a successful build alone does not mark it stable. Store candidates privately as draft releases or equivalent private artifact records. Do not update stable image aliases at candidate build time. + +## 2. Validate source and build once + +Run the authoritative `task check`, the full Go test suite through `task test:full`, and the required release-specific checks. Preserve dependency/security checks already required by the existing process when consolidating the workflow. Generated files and lockfiles must match the selected commit; unexpected changes fail the candidate. + +Build all required artifacts using that commit and intended version. Capture the host archive, `SHA256SUMS`, reviewed release notes, topology manifest, and immutable agent image digest. If a host container image remains a supported distribution, require it as part of the same candidate. + +The archive must include the binaries, updater scripts, and installation information its consumers need. Keep the candidate's full commit ID and artifact identities in the release record. Verify that the packaged version and recorded commit match the selected candidate. + +Pin deployable images by digest. Mutable tags such as `latest` are conveniences, not deployment identity. Preserve all candidate artifacts and evidence in durable private storage. + +## 3. Deploy to staging and run QA + +Use the exact archive and image digests produced in stage 2. Follow [the staging QA plan](Staging-and-QA), including fresh install, upgrade, useful work, recovery, and release-specific scenarios. + +A failure retains evidence and blocks progression. Retry infrastructure failures against the same candidate artifacts. Code changes require a new candidate. Do not rebuild validated binaries during promotion. + +## 4. Approve deployment + +Present Sam with the QA result, included changes, known limitations, migration requirements, and recovery procedure. Approval names the exact candidate and artifacts. + +Use the CI system's supported approval mechanism, or a restricted manual promotion trigger. Do not assume Gitea's deployment-environment semantics match GitHub's. Only an approved candidate can obtain the authority to deploy to production. + +## 5. Deploy through automation + +Allow only one production promotion at a time. Verify the candidate identity and production's starting state immediately before installation. Respect work-in-flight checks, graceful shutdown, and the existing journaled updater. + +Automation downloads authenticated artifacts, verifies checksums, pulls the pinned image, installs, restarts, and records progress. Installation follows one documented procedure in staging and production. A failed command must leave a diagnosable state and a safe retry or recovery action. + +## 6. Verify production + +Confirm that every required service reports the intended version and the configured agent image matches the approved digest. Check service health and complete a bounded real workflow using a designated test event/repository/channel. + +Observe the updater's health window and retain deployment logs. Choose and document any additional observation period based on normal workload frequency. Confirm accepted work remains accounted for. A startup check alone is not enough. + +On failure, stop promotion, execute the rehearsed recovery procedure, and record the outcome. Schema-changing recovery follows the release's explicit database procedure; do not assume swapping binaries restores database compatibility. + +## 7. Publish stable and close the release + +After production verification, mark the candidate's release as stable/published and advance any stable aliases to the same tested artifacts. Verify release metadata, authenticated downloads, checksums, and update discovery. + +Record the deployment outcome in the release issue, associate delivered implementation issues, and close the release issue. If final publication fails after deployment succeeds, record that partial state and retry publication without reinstalling or rebuilding. + +## Release issue template + +```text +Title: Release + +Purpose and included changes: +Candidate commit and tag: +Starting production version: +Pipeline run: +Host archive checksum: +Agent image digest: +Other required artifact identities: + +Source gate: +Full test suite: +Fresh install QA: +Upgrade QA: +Representative workflow QA: +Channel and settings QA: +Recovery rehearsal: +Release-specific QA: + +Known limitations and acceptance: +Schema/config/topology changes: +Recovery procedure: +Approval by Sam for this candidate: + +Deployment result: +Production versions and digest: +Production workflow verification: +Observation result: +Stable publication/update-discovery result: +Evidence links: +``` + +## Measure the process + +For each release, record validation, build, staging QA, deployment, and verification duration; failed stage; retry count; manual repair time; and whether production recovery was required. + +Review these results after several releases. Optimise the stages that actually dominate time or fail repeatedly. Keep check definitions centralised, build artifacts once, and prefer small release scopes that make failures easier to identify. diff --git a/Road-to-1.0.md b/Road-to-1.0.md new file mode 100644 index 0000000..fb0aa38 --- /dev/null +++ b/Road-to-1.0.md @@ -0,0 +1,48 @@ +# Road to the first supported product release + +[Guide home](Home) · [Previous: release process](Release-Process) + +The historical `1.53.0` numbering records development releases. The new `0.x` series will make product maturity explicit. `1.0.0` should represent a product promise Sam can maintain. + +## Define the supported boundary + +Write down the first supported installation method, operating system/architecture, required dependencies, supported providers/channels, and the workflows a user can rely on. Confirm these against behaviour in the running system. + +Choose the smallest useful complete product. Finish features within that boundary, remove dead paths, and document real limitations. Avoid delaying 1.0 for unrelated capabilities outside the promised scope. + +The external contract includes user-visible settings, workflow behaviour, APIs, data persistence, and supported upgrade behaviour. Define which parts are stable and what constitutes a breaking change. Product versions and database migration identifiers have different purposes. + +## Proposed milestones + +| Milestone | Outcome | +|---|---| +| Private development | Gitea checkout, reviewed issue backlog, runner gate, authenticated private distribution | +| Release rehearsal | Repeatable staging with installation, upgrade, representative workflow, and recovery evidence | +| `0.1.0` | First candidate delivered and verified through the new private release process | +| Subsequent `0.x` releases | Close observed product gaps and demonstrate repeatable upgrades | +| `1.0.0` | Defined supported product boundary and release criteria met | + +These are outcomes, not invented deadlines. Set dates after estimating the reviewed work and identifying real dependencies. + +## 1.0 acceptance criteria + +- A documented supported installation can be provisioned from scratch through automation. +- The promised user workflows work end to end, including real provider and agent execution paths. +- Settings exposed to users have functioning consumers. +- Service failures stay local and accepted work survives restart or dependency absence. +- Security boundaries remain intact, including grants, secrets, HMAC verification, and container confinement. +- A supported previous release can upgrade with its data and configuration preserved. +- Recovery is rehearsed, with explicit handling of schema changes and accepted work. +- The release pipeline deploys the exact staged artifacts and records production verification. +- Installation, operation, update, and troubleshooting documentation describe actual behaviour. +- Sam has decided the commercial offering and future licensing terms before distributing a commercial release. + +Use existing checks and real acceptance scenarios as evidence. Add tests for actual regressions or important changed contracts rather than creating a large suite of assertions about wiring. + +## Commercial decisions still open + +Decide who the first customer is, what they buy, the deployment responsibility, support scope, and the terms for future development. These decisions determine the operational promise; repository size and development cost alone do not define that promise. + +Previously published Apache 2.0 versions retain their granted rights. Any change to future terms needs a review of contribution ownership and included dependencies. The migration did not change the licence. + +The release work can progress while these decisions are being made. A dependable private deployment and upgrade process is useful regardless of the eventual commercial model. diff --git a/Staging-and-QA.md b/Staging-and-QA.md new file mode 100644 index 0000000..c2fc410 --- /dev/null +++ b/Staging-and-QA.md @@ -0,0 +1,60 @@ +# Staging and release QA + +[Guide home](Home) · [Previous: project tracking](Project-Tracking) · [Next: release process](Release-Process) + +Staging is a disposable rehearsal of the supported installation. It consumes the packaged candidate artifacts and follows the deployment procedure intended for production. + +## Choose the first reference installation + +The proposed first target is the installation Sam actually operates. Confirm its process supervisor and configuration before fixing the staging design. The current distribution supplies five Linux/amd64 host binaries, PostgreSQL, and a containerized agent runtime: + +- `archie-state-store` +- `archie-gateway` +- `archie-ui` +- `archie-messaging` +- `archied` +- `archie-agent`, running in task containers + +Match the deployed service layout, PostgreSQL version, configuration mechanism, artifact installation method, and image pull method. Keep each service's existing ownership and contract boundaries. Build one supported deployment path first; additional topologies can follow after that path is dependable. + +Staging needs separate databases, credentials, forge repository, messaging destinations, and task storage. Use synthetic data or an approved sanitised snapshot. It must not consume production work queues or send test messages to real recipients. + +Provision and reset it through automation. CI must be able to reach its artifact storage and registry. A reset should not require an undocumented server login. + +## Required release checks + +| Check | Behaviour to prove | Evidence | +|---|---|---| +| Fresh installation | Packaged artifacts install and all services become usable | Installer output, versions, manifest, service health | +| Upgrade | Previous stable installation upgrades while retaining state and settings | Before/after state assertions and migration logs | +| Representative workflow | An event is accepted durably, dispatches a real agent/tool task, and produces a visible result | Task ID, event trail, task outcome, resulting artifact | +| Chat/channel path | A test message reaches the gateway, uses the configured model/tool path, and returns a reply | Message/turn identifiers and outcome | +| Dashboard setting | A changed setting persists and affects its consumer | API/browser observation of the saved setting and effect | +| Recovery | An unhealthy candidate triggers the documented recovery and work remains accounted for | Failure injection, recovery logs, restored versions and task state | +| Release-specific QA | Each changed user-facing behaviour works as described | The concrete scenario and its result | + +Use test repositories and channels for outward actions. Include at least one real model/tool interaction in the appropriate end-to-end path; a fake provider alone cannot prove provider compatibility. Keep it bounded and capture cost where practical. + +Service readiness is necessary, but the representative workflow proves that services can do useful work together. A service temporarily missing must degrade locally without losing accepted work or causing peer processes to exit. + +## Test upgrades and recovery honestly + +For `0.1.0`, rehearse the explicit transition from the existing legacy installation. Retain its original binaries, image digest, configuration, and approved database backup. Later releases rehearse upgrades from the preceding supported `0.x` release. + +A binary rollback does not reverse a database migration. For each schema-changing release, establish whether the previous binaries can safely use the migrated database. If they cannot, record and rehearse the required forward fix or database restore procedure. Database restore can lose work accepted since the snapshot, so it requires an explicit recovery decision and reconciliation plan. + +Exercise interruption during installation and unhealthy startup through the existing updater mechanisms. Reuse its locking, journal, work-in-flight refusal, and independent watchdog. Confirm the actual deployment path behaves correctly rather than inferring it from source-level tests. + +## Record a QA result + +For each candidate, retain: + +- Commit, intended version, pipeline run, artifact checksums, and image digests. +- Tested topology and starting version. +- Each required scenario with pass/fail and supporting logs or artifacts. +- Known limitations accepted by Sam. +- Recovery result and any manual actions required. + +Do not store secrets or complete unsanitised request payloads in the evidence bundle. Keep candidate evidence available after the runner's temporary workspace disappears. + +**Complete when:** automation can provision staging, install the candidate, execute the required scenarios, collect a result, and clean up. A failed scenario blocks promotion and links to a concrete issue. diff --git a/_Sidebar.md b/_Sidebar.md new file mode 100644 index 0000000..69d978d --- /dev/null +++ b/_Sidebar.md @@ -0,0 +1,8 @@ +## Archie guide + +- [Home and current state](Home) +- [Migration to Gitea](Migration-to-Gitea) +- [Project tracking](Project-Tracking) +- [Staging and QA](Staging-and-QA) +- [Release process](Release-Process) +- [Road to 1.0](Road-to-1.0)