Files
Codex 35523ccd3c
myfileagent-python-ci/pipeline/head This commit looks good
Add Assignment 8 continuation handoff and v2 preview
2026-11-07 21:49:23 +00:00

9.9 KiB

Assignment 8 handoff — 7 November 2026

This is a continuation guide for the team and its Codex session. The assignment is not complete. The instructor source is dosManual-V1.43.pdf, Chapter 6, and the provided Examples/dosSecureDelivery starter. The deliverable is one updated team IT manual PDF plus accessible reviewed source and evidence.

Read this first: branch and review state

  • Repository: https://myfileagent.tech/myfileagent/myfileagent-pipeline
  • PR #17 was approved by nkogut for head c1cd3ad9af12e11af7c08c398c5fc93649cfd556 and merged to main as 6ba31a3b44906b5c19faa7ccba601e69798b142a. Check the merge parents, not the PR's moving head, when reconstructing what was reviewed.
  • Commit 88f3bb0d0aeffe3fe122ea3f5f797817e8c5523f was pushed to assignment8/secure-delivery after PR #17 merged. It is not in that merge or in main as of this handoff. It fixes dependency-audit coverage and evidence handling. This handoff and the accompanying v2 preview patch are additional branch changes. Open a new PR against main for these changes, run checks against its exact head, and obtain the required independent review; do not treat PR #17's approval as approval of later commits.
  • On the Droplet, the v1 worktree is /home/codex/myfileagent-gitea/assignment8-secure-delivery. The local v2 preview worktree is /home/codex/myfileagent-gitea/assignment8-v2-preview, branch assignment8/v2-preview, commit 2147b21640a3a644e9ab156bca9e7b5a82af4011. That preview has not been pushed or reviewed. v2-preview.patch alongside this file preserves that commit for a partner who only has Gitea access. Apply it to a new branch based on the final reviewed v1 state, inspect it, and test it; do not include it in the v1 release.

Verified foundation

  • Existing Gitea, Jenkins, Caddy, Prometheus, Grafana, Blackbox Exporter, and Node Exporter were running at the last check. Continue to preserve their configurations and data.
  • Jenkins has a dedicated assignment8-trusted agent. Its image definition and validated Compose recreation template are in agent/. The running container was created separately and has not been recreated with that template. The Docker socket group is currently 987; verify before any recreation. Docker socket access and the a8deploy account's passwordless root sudo are effectively host-administrator access. Restrict use to reviewed code and authorized jobs. Agent SSH host key is pinned in ansible/known_hosts; inventory uses the private gateway 172.20.0.1. The gateway can change if the network is recreated: verify before use.
  • With explicit team approval, Jenkins stores assignment8-deploy-ssh as a Global credential for a8deploy. Jenkins build #4 verified SSH and sudo. Jenkins credentials assignment8-registry-write and assignment8-registry-read are configured separately; never put secret values in Git, prompts, logs or the manual. The root Docker client authenticated with the read credential in build #5. Docker warned the credential is stored unencrypted in /root/.docker/config.json; limit access and remove it after assessment. A successful login is not proof of an actual image push or pull.
  • staging.myfileagent.tech and app.myfileagent.tech were configured in DNS and Caddy. Both returned valid TLS and HTTP 502 before application containers existed. Gitea, Jenkins and Grafana HTTPS returned 200 after the proxy reload. The saved previous proxy config is /home/codex/myfileagent-gitea/Caddyfile.before-assignment8.
  • The v1 app is under secure-delivery/v1, with pinned direct/transitive requirements and a pinned Python Alpine base image. Three unit tests passed. A test image passed an isolated health/version/price check and a HIGH/CRITICAL image scan; it used a placeholder source identity and is not a release.
  • The supplied v2 starter and the isolated v2 preview each passed three unit tests. No v2 release image exists yet.

Evidence and limitations

  • Jenkins validation #8 passed for commit 65e4011; validation #9 passed for c1cd3ad, including tests, the then-current dependency audit, secret scan, Ansible syntax, image build and image scan. Gitea reported its own PR check successful for c1cd3ad.
  • Dependency audit correction: the prior resolved pip-audit report listed eight of nine pinned packages and omitted packaging. A separate stricter audit using --disable-pip --no-deps listed all nine and found no known vulnerabilities on 7 November. Commit 88f3bb0 updates the pipelines to use that mode; it needs review and a complete Jenkins run on the final commit. Findings can change with the database.
  • Artifact caution: during build #9, a separate direct test wrote secret-scan-summary.json into the shared workspace shortly before archiving. That summary is independent test output, not build #9 evidence. Its image scan report and build log are separate. Guard-test #6 also archived stale reports; do not use those as #6 evidence. Guard-test #7 blocked the unmerged branch before publication and archived no files.
  • A controlled unit-test failure in test-gate build #1 skipped the following demonstration delivery stage. The test was restored and all three tests passed afterward. A disposable key triggered the secret scanner and blocked secret-gate build #4; the fixture was removed. The updated redacted summary was also tested directly with clean input and a disposable-key fixture, but not yet in a full updated pipeline.
  • Detailed chronological notes are in WORK_LOG.md. Raw scan and exercise evidence is under /home/codex/myfileagent-gitea/evidence/assignment8 on the Droplet; examine and redact before copying anything into the repository or manual. Do not publish real keys or tokens.

Continue in this order

  1. Fetch main and the latest assignment8/secure-delivery branch. Review the delta after the PR #17 merge, especially 88f3bb0, Jenkinsfile.release.draft, Jenkinsfile.security, scan-secrets.sh, the agent configuration and this handoff. Open a new PR for the unmerged fixes; run the updated security pipeline on its exact head and obtain the required independent review. Preserve branch protection.
  2. The release pipeline is a draft, not an end-to-end verified production pipeline. Review its Groovy, credentials, source/config identity, report capture, restricted ssw590 approval, idempotence check, registry digest selection and target pull. The source guard intentionally blocks a branch head not already in protected main. Groovy parsing and that guard were tested; later release stages have not been exercised. Configure the release job to use the reviewed main revision only after the changes are approved and merged.
  3. Recheck Gitea organization package-write permission for glovely and read access for the target with an actual release push and authenticated pull. The registry login worked, the token reported write:package, and read-only database inspection showed glovely on the organization Owners team; publication itself has not been proven. Build once from the reviewed commit, scan the actual image, publish it, and record the immutable registry digest. Do not substitute a local image ID.
  4. Deploy v1 to staging using Ansible and its release record. Verify HTTPS health, version, full baked source commit, and quantity-3 total 30. Repeat the unchanged playbook and capture changed=0. After a real restricted human Jenkins approval, promote the same digest to production and verify the same behavior. Record actual approver, times, build, source/config commits, scans, URLs and image digest. Never approve the human gate on the user's behalf.
  5. After v1 is verified and preserved, create a separately reviewed v2 commit using the preview patch as reference, update release-intent.json to v2/36, and run the complete build, scan, staging, approval and production flow. Retain the v1 image and matching configuration.
  6. Perform both required exercises: (a) roll healthy production v2 back to v1 image and matching configuration, verify v1/30 and measure interruption; (b) staging only, use the instructor's Gunicorn 8001 mismatch while the image healthcheck remains on 8000, show the Jenkins failure, restore the previous reviewed config and verify recovery. Preserve timestamps and evidence; do not stop shared services, delete volumes or claim zero downtime.
  7. Add the production health probe to the existing Blackbox/Grafana monitoring, retain the earlier probes and metrics, and correlate actual observations with release and rollback times. Complete the release, failure, rollback and cleanup runbooks; describe single-Droplet and stateful-migration limitations.
  8. Update the existing team IT manual (Assignment 7 v1.9.2 baseline) with a chapter titled Secure Delivery and Rollback, actual architecture, versions, traceability table, redacted evidence, runbooks, history and AI log. Build and visually verify one final PDF and include grader access instructions. Do not claim work that was not performed.

Access and handling

The user has repeatedly run /home/codex/myfileagent-gitea/push-assignment8-private.py as codex to authenticate feature-branch pushes. Do not ask them to paste credentials into chat. Jenkins' existing assignment8-validation job should point to secure-delivery/Jenkinsfile.security; it was temporarily changed for SSH and guard checks and then restored. Recheck its configuration and exact job revision before relying on a result. Existing users must make the required review and production approval decisions themselves.