Compare commits

...
Author SHA1 Message Date
Codex 0e7ade75b9 Define shared review contract and generate run data in automated PDF
myfileagent-python-ci/pipeline/head This commit looks good
Final project review (fixture) / review (push) Successful in 1m8s
2026-11-25 20:15:37 +00:00
Codex 1fa79546e6 Defer report authoring and retain technical build integration 2026-11-25 20:12:07 +00:00
Codex e8d4653abf Verify immutable release gates and document fixture handoff
myfileagent-python-ci/pipeline/head This commit looks good
Final project review (fixture) / review (push) Successful in 1m9s
2026-11-25 20:11:06 +00:00
Codex 5dc81e0b57 Reuse existing Jenkins credential and trust isolated build checkout
myfileagent-python-ci/pipeline/head This commit looks good
Final project review (fixture) / review (push) Successful in 49s
2026-11-25 20:07:44 +00:00
Codex bed90200d2 Build Member 2 fixture review-to-release pipeline
Final project review (fixture) / review (push) Successful in 1m7s
myfileagent-python-ci/pipeline/head This commit looks good
2026-11-25 20:03:12 +00:00
glovely 5373351a7e Merge pull request 'Finalize Assignment 9 Zammad implementation and manual 1.11.1' (#23) from assignment9/ticket-management into main
myfileagent-python-ci/pipeline/head This commit looks good
Team manual PDF / manual (push) Successful in 2m13s
Reviewed-on: #23
Reviewed-by: glovely <glovely@stevens.edu>
2026-11-22 03:02:02 +00:00
nkogut 0d835a15b9 Persist controller Python dependency across container recreation
Team manual PDF / manual (push) Successful in 2m19s
myfileagent-python-ci/pipeline/pr-main This commit looks good
2026-11-22 02:07:08 +00:00
nkogut 596a357cd8 Correct final manual 1.11.1 title date to November 20
myfileagent-python-ci/pipeline/head There was a failure building this commit
Team manual PDF / manual (push) Successful in 1m59s
myfileagent-python-ci/pipeline/pr-main There was a failure building this commit
2026-11-22 01:52:44 +00:00
nkogut cfc59d3511 Publish final manual 1.11.1 through official Actions build
myfileagent-python-ci/pipeline/head There was a failure building this commit
Team manual PDF / manual (push) Successful in 2m2s
2026-11-22 01:39:35 +00:00
nkogut 6fc01c26a9 [skip ci] Use native diagram proportions verified in manual layout
myfileagent-python-ci/pipeline/head There was a failure building this commit
2026-11-22 01:28:59 +00:00
nkogut 99f04d48a8 [skip ci] Refine verified vector diagram spacing for final pipeline
myfileagent-python-ci/pipeline/head There was a failure building this commit
2026-11-22 01:11:37 +00:00
Codex 3ba3940557 Finalize manual 1.11.1 diagram, chapter numbering and acceptance record
myfileagent-python-ci/pipeline/head There was a failure building this commit
Team manual PDF / manual (push) Successful in 2m20s
2026-11-22 01:00:08 +00:00
Codex e908359208 Reduce idle service footprint and record swap recovery checks 2026-11-21 23:21:42 +00:00
nkogut 22ac58c30b Fix duplicate labels in repeated Zammad table headers
myfileagent-python-ci/pipeline/head This commit looks good
Team manual PDF / manual (push) Successful in 1m59s
2026-11-21 21:52:22 +00:00
Codex 19f66a7845 Build Assignment 9 manual through existing Actions pipeline
myfileagent-python-ci/pipeline/head This commit looks good
Team manual PDF / manual (push) Failing after 2m0s
2026-11-21 21:37:46 +00:00
Codex 831dcc4b54 Reuse dated prior capacity evidence with explicit timing boundaries 2026-11-21 02:23:23 +00:00
Codex e459785351 Complete TA permissions evidence and align Hosts and Bitwarden registries 2026-11-21 01:44:40 +00:00
Codex 98a3a6d39e Record authenticated host firewall and effective SSH audit
myfileagent-python-ci/pipeline/head This commit looks good
2026-11-21 01:35:51 +00:00
34 changed files with 1672 additions and 81 deletions
+39
View File
@@ -0,0 +1,39 @@
name: Final project review (fixture)
on:
push:
branches: [feature/final-ci-demo, final-project-demo]
jobs:
review:
runs-on: manual-latex
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.sha }}
persist-credentials: false
- name: Verify source and run fixture contract tests
env:
SOURCE_SHA: ${{ github.sha }}
run: |
set -eu
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
python3 -m unittest discover -s ci/tests -v
- name: Produce explicitly simulated review bundle
env:
SOURCE_SHA: ${{ github.sha }}
ACTIONS_RUN_ID: ${{ github.run_id }}
ACTIONS_ATTEMPT: ${{ github.run_attempt }}
run: |
set -eu
echo 'Mode: fixture. No live model or live token evidence.'
python3 ci/fixtures/reviewer_stub.py --input ci/fixtures/demo_broken.txt --source-commit "$SOURCE_SHA" --out-dir out/review
python3 ci/final_project.py bundle --review-dir out/review --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode fixture --output out/review-bundle.zip
- name: Publish ready bundle for this exact run and attempt
uses: https://github.com/actions/upload-artifact@c6a366c94c3e0affe28c06c8df20a878f24da3cf
with:
name: review-${{ github.run_id }}-attempt-${{ github.run_attempt }}-${{ github.sha }}
path: out/review-bundle.zip
if-no-files-found: error
retention-days: 14
+1 -1
View File
@@ -1,7 +1,7 @@
name: Team manual PDF
on:
push:
branches: [main, manual-build-validation, assignment7/manual-1.9.2, assignment8/evidence-documentation]
branches: [main, manual-build-validation, assignment7/manual-1.9.2, assignment8/evidence-documentation, assignment9/ticket-management]
jobs:
manual:
runs-on: manual-latex
+4
View File
@@ -0,0 +1,4 @@
__pycache__/
*.py[cod]
out/
documentation/build/
+77
View File
@@ -0,0 +1,77 @@
pipeline {
agent { label 'assignment8-trusted' }
options { disableConcurrentBuilds(); skipDefaultCheckout(); timeout(time: 45, unit: 'MINUTES'); timestamps() }
parameters {
string(name: 'SOURCE_SHA', defaultValue: '', description: 'Full SHA of this reviewed pipeline branch and Actions run')
string(name: 'ACTIONS_RUN_ID', defaultValue: '', description: 'Exact successful Gitea Actions run')
string(name: 'ACTIONS_ATTEMPT', defaultValue: '1', description: 'Exact attempt')
choice(name: 'MODE', choices: ['fixture'], description: 'Live mode requires Member 1 integration and review')
}
stages {
stage('Checkout exact source') {
steps {
script {
if (!(params.SOURCE_SHA ==~ /[0-9a-f]{40}/) || !(params.ACTIONS_RUN_ID ==~ /[1-9][0-9]*/) || !(params.ACTIONS_ATTEMPT ==~ /[1-9][0-9]*/)) { error('Invalid run identity') }
}
deleteDir()
checkout scm
sh '''set -eu
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
mkdir -p out
'''
}
}
stage('Retrieve exact Actions bundle') {
steps {
withCredentials([string(credentialsId: 'gitea-jenkins-ci', variable: 'GITEA_TOKEN')]) {
sh '''set +x
set -eu
python3 ci/final_project.py fetch --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --output out/review-bundle.zip > out/actions-run.json
'''
}
}
}
stage('Validate identity and payload hashes') {
steps { sh '''set -eu
python3 ci/final_project.py verify --bundle out/review-bundle.zip --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --output out/verified
sh ci/toolchain.sh start
''' }
}
stage('Reserve durable release version') {
steps {
script {
env.RELEASE_VERSION = sh(script: 'sh ci/toolchain.sh exec python3 ci/final_project.py reserve --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --state /state --baseline 1.0', returnStdout: true).trim()
}
}
}
stage('Compile LaTeX report') {
steps { sh '''set -eu
RUN_NUMBER=$(python3 -c 'import json;print(json.load(open("out/actions-run.json"))["run_number"])')
sh ci/toolchain.sh exec python3 documentation/ci/build_manual.py --sha "$SOURCE_SHA" --run-number "$RUN_NUMBER" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --review-bundle /work/out/review-bundle.zip --release-version "$RELEASE_VERSION" --mode "$MODE" --jenkins-build "$BUILD_NUMBER"
''' }
}
stage('Unit, syntax and reviewed-file smoke tests') {
steps { sh '''set -eu
sh ci/toolchain.sh exec python3 -m unittest discover -s tests -v
sh ci/toolchain.sh exec python3 -m unittest discover -s ci/tests -v
sh ci/toolchain.sh exec python3 ci/final_project.py test --review-dir out/verified --output out/test-result.json
''' }
}
stage('Package immutable release') {
steps { sh '''set -eu
sh ci/toolchain.sh exec python3 ci/final_project.py publish --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --bundle out/review-bundle.zip --pdf documentation/build/main.pdf --state /state --output out/release --jenkins-build "$BUILD_NUMBER"
sh ci/toolchain.sh collect
''' }
}
stage('Publish downloadable ZIP') {
steps { archiveArtifacts artifacts: 'out/collected/release/*', fingerprint: true }
}
}
post {
always {
sh 'sh ci/toolchain.sh collect || true'
sh 'sh ci/toolchain.sh stop || true'
archiveArtifacts artifacts: 'out/actions-run.json,out/collected/test-result.json,out/collected/verified/verified.json', allowEmptyArchive: true
}
}
}
+53
View File
@@ -0,0 +1,53 @@
Member 2 handoff — 2026-11-25
Owner: Gowri (Member 2), implementation assisted by Codex.
Branch: feature/final-ci-demo
Base: 5373351a7e7ac2bc0f34bae19c25383de3843ca7 (current merged Homework 9 main).
Workspace: /home/codex/ssw590-member2
Get current revision: git rev-parse HEAD
Implemented:
- Independent fixture reviewer; no edits to Member 1's reviewer/demo/tests.
- Exact-SHA/run/attempt/mode artifact contract and strict bounded ZIP parsing.
- Gitea Actions fixture workflow using existing pins and manual-latex runner.
- Separate Jenkins pipeline/job definition, existing assignment8-trusted agent
and gitea-jenkins-ci credential binding (value never read).
- Isolated pinned TeX container and final-project build metadata mode.
Report authoring is deferred at the user's request. Earlier draft prose
is preserved on local archive/final-project-documentation-draft.
- Durable locked versions; immutable release reuse; no conflicting overwrite.
- ZIP manifest/hash and reviewed-file behavior gates.
- Live-only metric emitter and dashboard proposal (not deployed).
- 18 pipeline/publication tests passed in the pinned image; 2 existing
pricing tests passed. Host lacks pypdf, so 4 publication tests require
the image rather than host-only Python.
Observed evidence:
- Gitea Actions run 35 succeeded on bed90200d2e309a63b644a5f138624e6710be3bf.
- Its exact artifact was downloaded through the actual authenticated route.
- Full final-project report compiled in the pinned container on the Droplet.
- Fixture version 1.0.1 ZIP passed all payload hashes and fresh extraction/
runtime smoke verification. ci/evidence/fixture-run35.json records its hash.
- These downstream stages were executed directly in the isolated toolchain,
NOT by a Jenkins job. Subsequent fixes/tests must retain their own run IDs.
Pending before calling Member 2 remotely complete:
- User creates the prepared Jenkins job from the signed-in browser; browser
click/type automation is unavailable in this chat. No API login was assumed.
- Run the latest successful Actions SHA/run/attempt through the Jenkins job;
verify credential access, stage execution and downloadable archive.
- Rehearse downstream failure/no-publication and retry in Jenkins itself.
- Agree source baseline and final version line with Member 1 (1.0 provisional).
- Integrate actual model/runtime, measured token/memory results, AI/human SWOT
text and reviewable metrics collector configuration. No fake/live substitution.
- Record final issue/comment, cloud-load screenshots, peer review and demo.
- Write the report chapter later, only when the user resumes documentation.
Next operator action:
Read ci/OPERATIONS.txt and ci/jenkins-job.xml. Use the provided browser setup
snippet to create only final-project-fixture; keep existing jobs untouched.
Persistence/cleanup:
Volume ssw590-final-project-state contains fixture reservations/releases.
Temporary container names begin ssw590-final-. Remove only the known current
container, never the state volume or unrelated application/monitoring services.
+71
View File
@@ -0,0 +1,71 @@
SSW590 Member 2 operations — fixture stage
Starting main SHA: 5373351a7e7ac2bc0f34bae19c25383de3843ca7
Branch: feature/final-ci-demo
Workspace: /home/codex/ssw590-member2
Member 1's earlier uncommitted draft remains in /home/codex/ssw590-final-project.
No reviewer/ or tests/smoke_demo.py ownership is assumed here.
Run local unit checks:
python3 -m unittest discover -s ci/tests -v
python3 -m unittest discover -s tests -v
Actions:
The final-project workflow runs only on feature/final-ci-demo or
final-project-demo. It uses the existing manual-latex label and proven
action pins. It runs only simulated review until Member 1 is integrated.
Copy the successful full source SHA, numeric Actions run ID and attempt.
The name is review-RUN_ID-attempt-ATTEMPT-FULL_SHA.
Jenkins setup (requires an authenticated administrator):
1. Create Pipeline job final-project-fixture.
2. Pipeline from SCM: Git, existing public repository URL, branch
*/feature/final-ci-demo, Script Path Jenkinsfile.final-project.
3. Keep the existing myfileagent-python-ci required check unchanged.
4. Reuse existing Jenkins credential gitea-jenkins-ci. Its installed
PersonalAccessTokenImpl implements StringCredentials and supports the
string binding used here; no credential value was read during setup.
5. Run once to load parameters; then Build with Parameters using the exact
successful run SHA/ID/attempt. If branch HEAD has advanced, select the
corresponding new successful run (pipeline refuses a checkout mismatch).
6. Use the existing assignment8-trusted agent. The job creates a temporary
compiler container, network disabled, memory 256 MiB, 0.65 CPU; no
Docker socket or secrets are mounted into that compiler container.
7. The dedicated Docker volume ssw590-final-project-state retains
versions.json and releases/. Do not delete it on cleanup/retry.
8. Download the archived out/collected/release/*.zip and companion checksum.
Extract freshly, verify every manifest payload hash, inspect PDF identity,
and execute python3 reviewed.py (expected hello).
Version policy:
1.0 is a provisional baseline for fixture development, not a team-approved
final baseline. State locks serialize allocation across processes. Source
SHA and mode select a reservation; model/runtime must be pinned in source
before live integration. An unchanged retry reuses original immutable
published bytes/identity. Changed reviewed bytes under the same identity
fail. Final live baseline/identity must be agreed with Member 1.
Report builds:
Ordinary mode remains: python3 documentation/ci/build_manual.py with the
existing GITEA_SHA/RUN_NUMBER/RUN_ID/RUN_ATTEMPT variables.
Final mode additionally accepts --review-bundle, --release-version,
--jenkins-build and --mode. It validates the bundle before inserting data.
Both modes require the pinned TeX image. See ci/toolchain.sh.
Failure exercises:
reviewer_stub.py --case rejected/error produces diagnostics, no reviewed.py.
--case runtime produces valid Python that fails execution; hash it normally.
For transfer corruption, create/hash a good bundle first, then mutate one
payload without updating SHA256SUMS. Validation must fail before TeX.
For wrong identity, use a different expected run ID or SHA. Do not publish.
Execute deliberate TeX failures only in isolated test copies.
Fixture tests never establish real-model accuracy, memory or token evidence.
Monitoring handoff:
ci/final_project.py metrics accepts explicitly live review metadata only.
It emits availability gauges, counts when known and a supplied measured
completion timestamp, using atomic textfile replacement. Existing Node
Exporter textfile collection is not yet enabled by this change. Coordinate
paths, mounts and real metric evidence with Member 1 before deployment.
No paid resizing or production pricing/Zammad deployment is included.
+76
View File
@@ -0,0 +1,76 @@
{
"schema_version": 1,
"baseline_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"reviewer_cli": [
"--input",
"--source-commit",
"--out-dir"
],
"source_policy": "Never overwrite input; output directory must be fresh",
"outputs": [
"review.json",
"reviewed.py"
],
"required_review_fields": [
"source_commit",
"model_id",
"status",
"summary",
"diff",
"input_tokens",
"output_tokens"
],
"exit_codes": {
"0": [
"corrected",
"unchanged"
],
"2": [
"rejected"
],
"3": [
"error"
]
},
"ready_statuses": [
"corrected",
"unchanged"
],
"failure_policy": "No reviewed.py or ready bundle on rejected/error",
"tokens": "Measured nonnegative integers or null when unavailable; never estimated",
"modes": [
"fixture",
"live"
],
"fixture_model_id": "fixture-model",
"bundle_files": [
"reviewed.py",
"review.json",
"bundle.json",
"SHA256SUMS"
],
"bundle_identity": [
"schema_version",
"source_commit",
"run_id",
"attempt",
"mode"
],
"smoke_stdout": "hello\n",
"model_memory_target_bytes": 250000000,
"provisional_release_baseline": "1.0",
"owners": {
"member1": [
"real model and runtime pinning",
"reviewer CLI",
"actual token and memory measurement"
],
"member2": [
"Actions and Jenkins",
"artifact verification",
"PDF build automation",
"testing and versioned ZIP",
"monitoring integration"
]
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"source_sha": "bed90200d2e309a63b644a5f138624e6710be3bf",
"actions_run": "35",
"mode": "fixture",
"version": "1.0.1",
"payload_hashes": "passed",
"smoke": "passed",
"zip_sha256": "ecfecf00849828e22ad8be3e9f5dd3f330993fffa30224f3ab1eff13df94f4c6",
"execution": "isolated toolchain on Droplet; not a Jenkins job"
}
+334
View File
@@ -0,0 +1,334 @@
"""Exact-bundle validation and immutable release tooling; standard library only."""
import argparse
import contextlib
import fcntl
import hashlib
import io
import json
import os
from pathlib import Path
import re
import shutil
import stat
import subprocess
import sys
import tempfile
import urllib.request
import zipfile
ROOT = Path(__file__).resolve().parents[1]
BASE = 'https://myfileagent.tech'
REPO = 'myfileagent/myfileagent-pipeline'
PAYLOAD = {'reviewed.py', 'review.json'}
FILES = PAYLOAD | {'bundle.json', 'SHA256SUMS'}
MAX_BYTES = 2 * 1024 * 1024
def digest(data):
return hashlib.sha256(data).hexdigest()
def write_json(path, data):
path = Path(path)
path.parent.mkdir(parents=True, exist_ok=True)
tmp = path.with_name(path.name + '.tmp')
tmp.write_text(json.dumps(data, sort_keys=True, indent=2) + '\n', encoding='utf-8')
os.replace(tmp, path)
def identity(sha, run, attempt, mode):
if not re.fullmatch('[0-9a-f]{40}', str(sha)):
raise ValueError('Expected full lowercase SHA-1 source commit')
if any(not re.fullmatch('[1-9][0-9]*', str(x)) for x in (run, attempt)):
raise ValueError('Run ID and attempt must be positive integers')
if mode not in ('fixture', 'live'):
raise ValueError('Explicit fixture/live mode required')
return dict(schema_version=1, source_commit=sha, run_id=str(run), attempt=str(attempt), mode=mode)
def bundle_name(meta):
return f"review-{meta['run_id']}-attempt-{meta['attempt']}-{meta['source_commit']}"
def review_metadata(raw, expected):
data = json.loads(raw)
required = {'source_commit', 'model_id', 'status', 'summary', 'diff', 'input_tokens', 'output_tokens'}
if not isinstance(data, dict) or not required <= data.keys():
raise ValueError('Missing review metadata fields')
if data['source_commit'] != expected['source_commit'] or data['status'] not in ('corrected', 'unchanged'):
raise ValueError('Review identity/status does not permit a ready bundle')
if not all(isinstance(data[x], str) for x in ('summary', 'diff')):
raise ValueError('Review summary and diff must be strings')
if data.get('mode', expected['mode']) != expected['mode']:
raise ValueError('Review mode mismatch')
for key in ('input_tokens', 'output_tokens'):
value = data[key]
if value is not None and (type(value) is not int or value < 0):
raise ValueError('Invalid token count')
if data['status'] == 'corrected' and (not isinstance(data['model_id'], str) or not data['model_id']):
raise ValueError('Corrected review must identify its model')
if expected['mode'] == 'fixture' and data['model_id'] != 'fixture-model':
raise ValueError('Fixture model ID required')
if expected['mode'] == 'live' and data['model_id'] == 'fixture-model':
raise ValueError('Fixture data cannot be released in live mode')
return data
def zip_bytes(contents):
out = io.BytesIO()
with zipfile.ZipFile(out, 'w', compression=zipfile.ZIP_DEFLATED) as z:
for name, data in sorted(contents.items()):
info = zipfile.ZipInfo(name, date_time=(2020, 1, 1, 0, 0, 0))
info.compress_type = zipfile.ZIP_DEFLATED
info.external_attr = 0o100644 << 16
z.writestr(info, data)
return out.getvalue()
def create_bundle(review_dir, output, expected):
output = Path(output)
if output.exists():
raise ValueError('Refuse to overwrite a bundle')
files = {}
for name in PAYLOAD:
path = Path(review_dir) / name
if path.is_symlink() or not path.is_file() or path.stat().st_size > MAX_BYTES:
raise ValueError('Invalid review file')
files[name] = path.read_bytes()
review_metadata(files['review.json'], expected)
files['bundle.json'] = (json.dumps(expected, sort_keys=True)+'\n').encode()
files['SHA256SUMS'] = ''.join(f'{digest(files[n])} {n}\n' for n in sorted(PAYLOAD)).encode()
output.parent.mkdir(parents=True, exist_ok=True)
output.write_bytes(zip_bytes(files))
def read_bundle(path, expected):
if Path(path).stat().st_size > MAX_BYTES:
raise ValueError('Bundle exceeds size limit')
with zipfile.ZipFile(path) as z:
entries = z.infolist()
if len(entries) != len(FILES) or {i.filename for i in entries} != FILES:
raise ValueError('Unexpected, duplicate or missing bundle files')
if sum(i.file_size for i in entries) > MAX_BYTES:
raise ValueError('Expanded bundle exceeds size limit')
for i in entries:
kind = stat.S_IFMT(i.external_attr >> 16)
if kind not in (0, stat.S_IFREG) or i.flag_bits & 1:
raise ValueError('Only unencrypted regular files are allowed')
files = {i.filename: z.read(i) for i in entries}
if json.loads(files['bundle.json']) != expected:
raise ValueError('Bundle SHA/run/attempt/mode mismatch')
required = ''.join(f'{digest(files[n])} {n}\n' for n in sorted(PAYLOAD)).encode()
if files['SHA256SUMS'] != required:
raise ValueError('Payload checksum mismatch')
review_metadata(files['review.json'], expected)
return files
def verify_bundle(path, destination, expected):
files = read_bundle(path, expected)
destination = Path(destination)
destination.mkdir(parents=True, exist_ok=False)
for name, data in files.items():
(destination / name).write_bytes(data)
write_json(destination / 'verified.json', dict(**expected, bundle_sha256=digest(Path(path).read_bytes())))
return files
class SameOrigin(urllib.request.HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, headers, newurl):
from urllib.parse import urlsplit
if urlsplit(newurl).scheme != 'https' or urlsplit(newurl).netloc != 'myfileagent.tech':
raise ValueError('Refuse cross-origin artifact redirect')
return super().redirect_request(req, fp, code, msg, headers, newurl)
def fetch_bundle(output, expected):
token = os.environ.get('GITEA_TOKEN', '')
opener = urllib.request.build_opener(SameOrigin())
headers = {'Authorization': 'token '+token} if token else {}
def get(url, limit):
with opener.open(urllib.request.Request(url, headers=headers), timeout=60) as response:
raw = response.read(limit+1)
if len(raw) > limit:
raise ValueError('Response exceeds size limit')
return raw
# Server-side success is checked independently from client-supplied metadata.
run = json.loads(get(f'{BASE}/api/v1/repos/{REPO}/actions/runs/{expected["run_id"]}', MAX_BYTES))
if run.get('conclusion') != 'success' or run.get('head_sha') != expected['source_commit']:
raise ValueError('Selected Actions run is not successful on the expected SHA')
if str(run.get('run_attempt', '1')) != expected['attempt']:
raise ValueError('Actions run attempt mismatch')
name = bundle_name(expected)
raw = get(f'{BASE}/{REPO}/actions/runs/{expected["run_id"]}/artifacts/{name}', MAX_BYTES)
# upload-artifact wraps our canonical review-bundle.zip in its own ZIP.
with zipfile.ZipFile(io.BytesIO(raw)) as outer:
entries = outer.infolist()
if len(entries) != 1 or entries[0].filename != 'review-bundle.zip' or entries[0].file_size > MAX_BYTES:
raise ValueError('Unexpected Actions artifact wrapper')
content = outer.read(entries[0])
output = Path(output)
output.parent.mkdir(parents=True, exist_ok=True)
with output.open('xb') as target:
target.write(content)
read_bundle(output, expected)
return run
@contextlib.contextmanager
def locked(state):
state = Path(state)
state.mkdir(parents=True, exist_ok=True)
with (state / '.lock').open('a') as lock:
fcntl.flock(lock, fcntl.LOCK_EX)
yield state
def release_key(meta):
# Mode separates simulated and live reservations. Model/runtime must be pinned in the commit.
return f"{meta['mode']}:{meta['source_commit']}"
def reserve(state, meta, baseline='1.0'):
if not re.fullmatch(r'(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)', baseline):
raise ValueError('Baseline must be Major.Minor')
with locked(state) as state:
path = state / 'versions.json'
registry = json.loads(path.read_text()) if path.exists() else {'baseline': baseline, 'next': 1, 'reservations': {}}
if registry['baseline'] != baseline:
raise ValueError('Baseline differs from durable registry')
key = release_key(meta)
if key not in registry['reservations']:
registry['reservations'][key] = f"{baseline}.{registry['next']}"
registry['next'] += 1
write_json(path, registry)
return registry['reservations'][key]
def smoke(path):
run = subprocess.run([sys.executable, str(path)], capture_output=True, text=True, timeout=10)
if run.returncode or run.stdout != 'hello\n':
raise ValueError('Reviewed-file smoke test failed')
def test_review(verified, receipt):
root = Path(verified)
subprocess.run([sys.executable, '-m', 'py_compile', str(root / 'reviewed.py')], check=True, timeout=10)
# Adopt Member 1's smoke entry point when integrated; retain the independent assertion.
member1 = ROOT / 'tests/smoke_demo.py'
if member1.exists():
subprocess.run([sys.executable, str(member1), str(root/'reviewed.py')], check=True, timeout=20)
smoke(root / 'reviewed.py')
write_json(receipt, {'reviewed_sha256': digest((root/'reviewed.py').read_bytes()), 'result': 'passed'})
def publish(bundle, expected, pdf, state, output, baseline, jenkins_build):
files = read_bundle(bundle, expected)
version = reserve(state, expected, baseline)
pdf = Path(pdf)
from pypdf import PdfReader
reader = PdfReader(pdf)
text = '\n'.join(p.extract_text() or '' for p in reader.pages)
for value in [version, expected['source_commit']]:
if value not in text:
raise ValueError('PDF is missing release identity')
build_meta = json.loads(pdf.with_name('build-manifest.json').read_text())
if (build_meta.get('release_version') != version or build_meta.get('commit') != expected['source_commit']
or build_meta.get('review_sha256') != digest(files['review.json'])
or build_meta.get('reviewed_sha256') != digest(files['reviewed.py'])
or build_meta.get('pdf_sha256') != digest(pdf.read_bytes())
or build_meta.get('run_id') != expected['run_id'] or build_meta.get('attempt') != expected['attempt']
or build_meta.get('mode') != expected['mode']):
raise ValueError('Report manifest does not match this verified bundle')
with tempfile.TemporaryDirectory() as temp:
candidate = Path(temp)/'reviewed.py'
candidate.write_bytes(files['reviewed.py'])
smoke(candidate) # Publication cannot bypass the behavior gate.
contents = {n: files[n] for n in PAYLOAD}
contents[f'report-{version}.pdf'] = pdf.read_bytes()
contents['README.txt'] = (f'SSW590 final project {version}\nMode: {expected["mode"]}\n'
f'Source: {expected["source_commit"]}\nPython 3 required (tested by CI).\n'
'Extract into a fresh directory; run: python3 reviewed.py\nExpected stdout: hello\n'
'Compare payload SHA-256 hashes with manifest.json; compare the ZIP with its companion .sha256.\n'
'Fixture mode is simulated evidence, not a real AI review.\n').encode()
manifest = dict(**expected, version=version, jenkins_build=str(jenkins_build),
payload_sha256={n:digest(b) for n,b in sorted(contents.items())})
contents['manifest.json'] = (json.dumps(manifest, sort_keys=True, indent=2)+'\n').encode()
archive = zip_bytes(contents)
name = f'ssw590-{expected["mode"]}-{version}.zip'
with locked(state) as state:
release = state/'releases'/name
release.parent.mkdir(exist_ok=True)
if release.exists():
# A published version is immutable. A new build identity/PDF cannot silently overwrite it.
if release.read_bytes() != archive:
previous = release.read_bytes()
with zipfile.ZipFile(io.BytesIO(previous)) as z:
old_manifest = json.loads(z.read('manifest.json'))
if (old_manifest['source_commit'] != expected['source_commit']
or old_manifest['mode'] != expected['mode']
or any(z.read(n) != files[n] for n in PAYLOAD)):
raise ValueError('Version already published with different reviewed payload')
archive = previous
manifest = old_manifest
print('Reusing immutable release and its original build identity', file=sys.stderr)
else:
tmp = release.with_suffix('.tmp')
tmp.write_bytes(archive)
os.replace(tmp, release)
out = Path(output)
out.mkdir(parents=True, exist_ok=True)
(out/name).write_bytes(archive)
(out/(name+'.sha256')).write_text(f'{digest(archive)} {name}\n')
write_json(out/'release.json', manifest)
return name
def metrics(review, output, completed_at):
data = json.loads(Path(review).read_text())
if data.get('mode') != 'live' or data.get('model_id') == 'fixture-model':
raise ValueError('Only explicitly live metadata may emit live metrics')
rows = []
for key in ('input_tokens', 'output_tokens'):
value = data.get(key)
known = type(value) is int and value >= 0
rows += [f'review_{key}_available{{mode="live"}} {int(known)}']
if known:
rows += [f'review_{key}{{mode="live"}} {value}']
if not re.fullmatch('[0-9]+', str(completed_at)):
raise ValueError('Completion timestamp must be measured epoch seconds')
rows += [f'review_completed_timestamp_seconds{{mode="live"}} {completed_at}']
output = Path(output)
output.parent.mkdir(parents=True, exist_ok=True)
tmp = output.with_suffix('.tmp')
tmp.write_text('\n'.join(rows)+'\n')
os.replace(tmp, output)
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument('action', choices=['bundle','fetch','verify','reserve','test','publish','metrics'])
p.add_argument('--sha'); p.add_argument('--run-id'); p.add_argument('--attempt', default='1')
p.add_argument('--mode', choices=['fixture','live'], default='fixture')
p.add_argument('--review-dir'); p.add_argument('--bundle'); p.add_argument('--output')
p.add_argument('--state'); p.add_argument('--baseline', default='1.0'); p.add_argument('--pdf')
p.add_argument('--jenkins-build', default='local'); p.add_argument('--completed-at')
a = p.parse_args()
if a.action == 'test':
test_review(a.review_dir, a.output); return
if a.action == 'metrics':
metrics(a.review_dir+'/review.json', a.output, a.completed_at); return
meta = identity(a.sha,a.run_id,a.attempt,a.mode)
if a.action == 'bundle': create_bundle(a.review_dir,a.output,meta)
elif a.action == 'fetch': print(json.dumps(fetch_bundle(a.output,meta)))
elif a.action == 'verify': verify_bundle(a.bundle,a.output,meta)
elif a.action == 'reserve': print(reserve(a.state,meta,a.baseline))
elif a.action == 'publish': print(publish(a.bundle,meta,a.pdf,a.state,a.output,a.baseline,a.jenkins_build))
if __name__ == '__main__':
try:
main()
except Exception as exc:
print(f'Final-project gate failed: {type(exc).__name__}: {exc}', file=sys.stderr)
raise SystemExit(1)
+1
View File
@@ -0,0 +1 @@
print("hello"
+1
View File
@@ -0,0 +1 @@
print("hello")
+63
View File
@@ -0,0 +1,63 @@
"""Standalone simulated reviewer. Does not import Member 1's code."""
import argparse
import ast
import difflib
import json
from pathlib import Path
import re
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument('--input', required=True)
p.add_argument('--source-commit', required=True)
p.add_argument('--out-dir', required=True)
p.add_argument('--case', choices=['good', 'rejected', 'error', 'runtime'], default='good')
a = p.parse_args()
out = Path(a.out_dir)
try:
out.mkdir(parents=True, exist_ok=False)
except OSError:
p.exit(3, 'A fresh writable output directory is required\n')
data = dict(source_commit=a.source_commit, model_id='fixture-model', mode='fixture',
status='error', summary='', diff='', input_tokens=24, output_tokens=8)
result = 3
try:
if not re.fullmatch('[0-9a-f]{40}', a.source_commit):
raise ValueError('Full SHA required')
source = Path(a.input).read_text(encoding='utf-8')
if a.case == 'error':
raise RuntimeError('Simulated operational error')
if a.case == 'rejected':
data.update(status='rejected', summary='Simulated rejected proposal')
result = 2
else:
if a.case == 'runtime':
candidate = 'raise RuntimeError("fixture")\n'
status = 'corrected'
else:
try:
ast.parse(source)
candidate, status = source, 'unchanged'
data.update(input_tokens=None, output_tokens=None)
except SyntaxError:
if source not in ['print("hello"', 'print("hello"\n']:
data.update(status='rejected', summary='Unsupported fixture')
(out / 'review.json').write_text(json.dumps(data, indent=2)+'\n')
return 2
candidate = source.rstrip('\n') + ')' + ('\n' if source.endswith('\n') else '')
status = 'corrected'
data.update(status=status, summary=f'SIMULATED {a.case} fixture; not live AI evidence',
diff=''.join(difflib.unified_diff(source.splitlines(True), candidate.splitlines(True),
fromfile='original.py', tofile='reviewed.py')))
(out / 'reviewed.py').write_text(candidate, encoding='utf-8')
result = 0
except Exception as exc:
data['summary'] = f'Simulated fixture failure: {type(exc).__name__}'
(out / 'reviewed.py').unlink(missing_ok=True)
(out / 'review.json').write_text(json.dumps(data, indent=2)+'\n', encoding='utf-8')
return result
if __name__ == '__main__':
raise SystemExit(main())
+29
View File
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<flow-definition plugin="workflow-job">
<description>SSW590 Member 2 fixture pipeline. Simulated review, not live model evidence. Separate from the protected-main Python check.</description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition><name>SOURCE_SHA</name><description>Full SHA matching the selected Actions run and current Member 2 branch HEAD</description><defaultValue></defaultValue><trim>true</trim></hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition><name>ACTIONS_RUN_ID</name><description>Successful exact Actions run ID</description><defaultValue></defaultValue><trim>true</trim></hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition><name>ACTIONS_ATTEMPT</name><defaultValue>1</defaultValue><trim>true</trim></hudson.model.StringParameterDefinition>
<hudson.model.ChoiceParameterDefinition><name>MODE</name><choices class="java.util.Arrays$ArrayList"><a class="string-array"><string>fixture</string></a></choices></hudson.model.ChoiceParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps">
<scm class="hudson.plugins.git.GitSCM" plugin="git">
<configVersion>2</configVersion>
<userRemoteConfigs><hudson.plugins.git.UserRemoteConfig><url>https://myfileagent.tech/myfileagent/myfileagent-pipeline.git</url></hudson.plugins.git.UserRemoteConfig></userRemoteConfigs>
<branches><hudson.plugins.git.BranchSpec><name>*/feature/final-ci-demo</name></hudson.plugins.git.BranchSpec></branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="empty-list"/>
<extensions/>
</scm>
<scriptPath>Jenkinsfile.final-project</scriptPath>
<lightweight>true</lightweight>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>
+145
View File
@@ -0,0 +1,145 @@
import concurrent.futures
import io
import json
from pathlib import Path
import stat
import subprocess
import sys
import tempfile
import unittest
import zipfile
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
from ci.final_project import identity, create_bundle, read_bundle, verify_bundle, reserve, test_review, metrics, zip_bytes
SHA = 'a' * 40
META = identity(SHA, '1', '1', 'fixture')
def reserve_worker(args):
state, sha = args
return reserve(state, identity(sha, '1', '1', 'fixture'))
class PipelineTests(unittest.TestCase):
def setUp(self):
self.temp = tempfile.TemporaryDirectory()
self.addCleanup(self.temp.cleanup)
self.root = Path(self.temp.name)
self.review = self.root/'review'
self.review.mkdir()
self.review.joinpath('reviewed.py').write_text('print("hello")\n')
self.review.joinpath('review.json').write_text(json.dumps(dict(source_commit=SHA,
model_id='fixture-model', mode='fixture', status='corrected', summary='SIMULATED', diff='fixture',
input_tokens=24, output_tokens=8)))
self.bundle = self.root/'bundle.zip'
create_bundle(self.review, self.bundle, META)
def contents(self):
with zipfile.ZipFile(self.bundle) as z:
return {n:z.read(n) for n in z.namelist()}
def test_good_bundle_and_smoke(self):
out = self.root/'verified'
verify_bundle(self.bundle,out,META)
test_review(out,self.root/'tested.json')
self.assertEqual(json.loads((self.root/'tested.json').read_text())['result'],'passed')
def test_tampered_transfer(self):
files=self.contents();files['reviewed.py']=b'print("changed")\n'
self.bundle.write_bytes(zip_bytes(files))
with self.assertRaisesRegex(ValueError,'checksum'):read_bundle(self.bundle,META)
def test_wrong_identity(self):
for key,value in [('source_commit','b'*40),('run_id','2'),('attempt','2'),('mode','live')]:
with self.subTest(key=key), self.assertRaisesRegex(ValueError,'mismatch'):
read_bundle(self.bundle,{**META,key:value})
def test_unexpected_paths(self):
for name in ['../escape','/absolute','nested/file']:
files=self.contents();files[name]=b'bad'
path=self.root/'bad.zip';path.write_bytes(zip_bytes(files))
with self.subTest(name=name),self.assertRaises(ValueError):read_bundle(path,META)
def test_duplicate_and_symlink(self):
files=self.contents()
for kind in ['duplicate','symlink']:
out=io.BytesIO()
with zipfile.ZipFile(out,'w') as z:
for n,b in files.items():
info=zipfile.ZipInfo(n)
info.external_attr=((stat.S_IFLNK|0o777) if kind=='symlink' and n=='reviewed.py' else 0o100644)<<16
z.writestr(info,b)
if kind=='duplicate':z.writestr('reviewed.py',b'bad')
path=self.root/'bad.zip';path.write_bytes(out.getvalue())
with self.subTest(kind=kind),self.assertRaises(ValueError):read_bundle(path,META)
def test_fresh_output_required(self):
out=self.root/'verified';verify_bundle(self.bundle,out,META)
with self.assertRaises(FileExistsError):verify_bundle(self.bundle,out,META)
def test_rejected_not_bundled(self):
for status in ['rejected','error']:
data=json.loads((self.review/'review.json').read_text());data['status']=status
(self.review/'review.json').write_text(json.dumps(data))
with self.subTest(status=status),self.assertRaises(ValueError):create_bundle(self.review,self.root/'no.zip',META)
self.assertFalse((self.root/'no.zip').exists())
def test_runtime_failure_reaches_smoke(self):
(self.review/'reviewed.py').write_text('raise RuntimeError("fixture")\n')
path=self.root/'runtime.zip';create_bundle(self.review,path,META)
out=self.root/'runtime';verify_bundle(path,out,META)
with self.assertRaisesRegex(ValueError,'smoke'):test_review(out,self.root/'receipt.json')
self.assertFalse((self.root/'receipt.json').exists())
def test_version_retry_and_mode(self):
state=self.root/'state'
self.assertEqual(reserve(state,META),'1.0.1')
self.assertEqual(reserve(state,META),'1.0.1')
self.assertEqual(reserve(state,{**META,'mode':'live'}),'1.0.2')
with self.assertRaises(ValueError):reserve(state,META,'2.0')
def test_concurrent_reservation(self):
state=str(self.root/'state')
with concurrent.futures.ProcessPoolExecutor(max_workers=3) as pool:
same=list(pool.map(reserve_worker,[(state,SHA)]*6))
other=list(pool.map(reserve_worker,[(state,f'{i:040x}') for i in range(6)]))
self.assertEqual(len(set(same)),1)
self.assertEqual(len(set(other)),6)
self.assertNotIn(same[0],other)
def test_metrics_reject_fixture(self):
with self.assertRaises(ValueError):metrics(self.review/'review.json',self.root/'metrics.prom','123')
self.assertFalse((self.root/'metrics.prom').exists())
def test_missing_live_counts_are_unknown(self):
data=json.loads((self.review/'review.json').read_text())
data.update(mode='live',model_id='real-model',input_tokens=None,output_tokens=7)
(self.review/'review.json').write_text(json.dumps(data))
metrics(self.review/'review.json',self.root/'metrics.prom','123')
text=(self.root/'metrics.prom').read_text()
self.assertIn('review_input_tokens_available{mode="live"} 0',text)
self.assertNotIn('review_input_tokens{',text)
self.assertIn('review_output_tokens{mode="live"} 7',text)
def test_fixture_cli_and_source_integrity(self):
source=self.root/'source.py';source.write_text('print("hello"\n')
before=source.read_bytes()
for case,exit_code in [('good',0),('rejected',2),('error',3),('runtime',0)]:
out=self.root/case
run=subprocess.run([sys.executable,'ci/fixtures/reviewer_stub.py','--input',str(source),
'--source-commit',SHA,'--out-dir',str(out),'--case',case],capture_output=True)
self.assertEqual(run.returncode,exit_code,run.stderr)
self.assertEqual((out/'reviewed.py').exists(),exit_code==0)
self.assertEqual(source.read_bytes(),before)
def test_fixture_unchanged(self):
source=self.root/'valid.py';source.write_text('print("hello")\n')
out=self.root/'valid'
subprocess.run([sys.executable,'ci/fixtures/reviewer_stub.py','--input',str(source),
'--source-commit',SHA,'--out-dir',str(out)],check=True)
data=json.loads((out/'review.json').read_text())
self.assertEqual(data['status'],'unchanged');self.assertEqual(data['diff'],'')
self.assertEqual((out/'reviewed.py').read_bytes(),source.read_bytes())
if __name__=='__main__':unittest.main()
+71
View File
@@ -0,0 +1,71 @@
"""Publication gate tests run in the pinned compiler image (which provides pypdf)."""
import importlib.util
import io
import json
from pathlib import Path
import sys
import tempfile
import unittest
import zipfile
sys.path.insert(0,str(Path(__file__).resolve().parents[2]))
from ci.final_project import identity,create_bundle,publish,digest
@unittest.skipUnless(importlib.util.find_spec('pypdf'), 'pypdf is supplied by the pinned TeX image')
class ReleaseTests(unittest.TestCase):
def setUp(self):
from pypdf import PdfWriter
from pypdf.generic import DictionaryObject,NameObject,DecodedStreamObject
self.temp=tempfile.TemporaryDirectory();self.addCleanup(self.temp.cleanup)
self.root=Path(self.temp.name);self.meta=identity('a'*40,'1','1','fixture')
self.review=self.root/'review';self.review.mkdir()
(self.review/'reviewed.py').write_text('print("hello")\n')
(self.review/'review.json').write_text(json.dumps(dict(source_commit='a'*40,model_id='fixture-model',
mode='fixture',status='corrected',summary='fixture',diff='fixture',input_tokens=24,output_tokens=8)))
self.bundle=self.root/'review.zip';create_bundle(self.review,self.bundle,self.meta)
self.pdf=self.root/'main.pdf'
writer=PdfWriter();page=writer.add_blank_page(width=1200,height=800)
font=DictionaryObject({NameObject('/Type'):NameObject('/Font'),NameObject('/Subtype'):NameObject('/Type1'),NameObject('/BaseFont'):NameObject('/Helvetica')})
page[NameObject('/Resources')]=DictionaryObject({NameObject('/Font'):DictionaryObject({NameObject('/F1'):font})})
stream=DecodedStreamObject();stream.set_data(('BT /F1 10 Tf 40 700 Td (1.0.1 '+ 'a'*40+' Configuring and Running the DevOps Pipeline) Tj ET').encode())
page[NameObject('/Contents')]=writer._add_object(stream)
with self.pdf.open('wb') as f:writer.write(f)
self.manifest=dict(release_version='1.0.1',commit='a'*40,review_sha256=digest((self.review/'review.json').read_bytes()),
reviewed_sha256=digest((self.review/'reviewed.py').read_bytes()),pdf_sha256=digest(self.pdf.read_bytes()),run_id='1',attempt='1',mode='fixture')
self.write_manifest()
def write_manifest(self):
self.pdf.with_name('build-manifest.json').write_text(json.dumps(self.manifest))
def run_publish(self,build='1'):
return publish(self.bundle,self.meta,self.pdf,self.root/'state',self.root/'out','1.0',build)
def test_publish_and_retry_preserve_bytes(self):
name=self.run_publish();before=(self.root/'out'/name).read_bytes()
with zipfile.ZipFile(io.BytesIO(before)) as z:
manifest=json.loads(z.read('manifest.json'))
for path,sha in manifest['payload_sha256'].items():self.assertEqual(digest(z.read(path)),sha)
self.run_publish('2')
self.assertEqual((self.root/'out'/name).read_bytes(),before)
self.assertEqual(json.loads((self.root/'out/release.json').read_text())['jenkins_build'],'1')
def test_report_mismatch_prevents_release(self):
self.manifest['reviewed_sha256']='b'*64;self.write_manifest()
with self.assertRaisesRegex(ValueError,'manifest'):self.run_publish()
self.assertFalse((self.root/'out').exists())
self.assertFalse((self.root/'state/releases').exists())
def test_runtime_failure_prevents_release(self):
(self.review/'reviewed.py').write_text('raise RuntimeError("fixture")\n')
self.bundle.unlink();create_bundle(self.review,self.bundle,self.meta)
self.manifest['reviewed_sha256']=digest((self.review/'reviewed.py').read_bytes());self.write_manifest()
with self.assertRaisesRegex(ValueError,'smoke'):self.run_publish()
self.assertFalse((self.root/'state/releases').exists())
def test_existing_version_refuses_changed_review(self):
self.run_publish()
data=json.loads((self.review/'review.json').read_text());data['summary']='different'
(self.review/'review.json').write_text(json.dumps(data))
self.bundle.unlink();create_bundle(self.review,self.bundle,self.meta)
self.manifest['review_sha256']=digest((self.review/'review.json').read_bytes());self.write_manifest()
with self.assertRaisesRegex(ValueError,'different reviewed payload'):self.run_publish('2')
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
# Called on the existing trusted agent. No host socket/network enters this container.
set -eu
name="ssw590-final-${BUILD_NUMBER:-local}"
image='sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1'
case "$1" in
start)
docker run -d --name "$name" --network none --memory 256m --memory-swap 256m --cpus .65 --pids-limit 256 \
--mount type=volume,src=ssw590-final-project-state,dst=/state \
--workdir /work --entrypoint sleep "$image" 3600
docker cp . "$name:/work"
docker exec "$name" git config --global --add safe.directory /work
;;
exec) shift; docker exec "$name" "$@" ;;
collect) mkdir -p out/collected; docker cp "$name:/work/out/." out/collected/ ;;
stop) docker rm -f "$name" ;;
*) echo 'Expected start, exec, collect or stop' >&2; exit 2 ;;
esac
+2 -1
View File
@@ -34,4 +34,5 @@ backups, synthetic support tickets, customer isolation and an Agent-only TA
account. A Gitea issue links the customer request to engineering work; the
existing HTTPS monitoring job and dashboard are extended. Actual test results,
screenshots, failure corrections and required evidence gaps are retained. The
source-only 1.11.0 draft awaits a later explicitly authorized Jenkins PDF build.
version 1.11.1 includes the completed browser workflow evidence, an updated
deployment diagram and the automated manual-build identity.
+58 -1
View File
@@ -13,6 +13,9 @@ import re
import shutil
import subprocess
import tempfile
import sys
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
from ci.final_project import identity, read_bundle, digest
def build_metadata(sha, run_number, run_id, attempt):
@@ -64,6 +67,10 @@ def main():
parser.add_argument("--run-number", default=os.environ.get("GITEA_RUN_NUMBER", ""))
parser.add_argument("--run-id", default=os.environ.get("GITEA_RUN_ID", ""))
parser.add_argument("--attempt", default=os.environ.get("GITEA_RUN_ATTEMPT", "1"))
parser.add_argument("--review-bundle")
parser.add_argument("--release-version")
parser.add_argument("--jenkins-build", default="local")
parser.add_argument("--mode", choices=["fixture", "live"], default="fixture")
args = parser.parse_args()
metadata = build_metadata(args.sha, args.run_number, args.run_id, args.attempt)
source = Path(__file__).resolve().parents[1]
@@ -74,6 +81,19 @@ def main():
if not version_match:
raise ValueError("Human-maintained document version is missing")
metadata["document_version"] = version_match.group(1)
review_files = None
if bool(args.review_bundle) != bool(args.release_version):
raise ValueError("Review bundle and release version must be supplied together")
if args.review_bundle:
if not re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+", args.release_version):
raise ValueError("Major.Minor.Changelist required")
if not re.fullmatch(r"[A-Za-z0-9_-]{1,80}", args.jenkins_build):
raise ValueError("Invalid Jenkins build identity")
review_files = read_bundle(args.review_bundle, identity(args.sha, args.run_id, args.attempt, args.mode))
metadata.update(release_version=args.release_version, mode=args.mode,
jenkins_build=args.jenkins_build,
review_sha256=digest(review_files["review.json"]),
reviewed_sha256=digest(review_files["reviewed.py"]))
output = source / "build"
output.mkdir(exist_ok=True)
# Remove only this build's known publish targets, so a failed rebuild cannot
@@ -83,7 +103,44 @@ def main():
with tempfile.TemporaryDirectory(prefix="manual-ci-") as temp:
workspace = Path(temp)
copy_sources(source, workspace)
(workspace / "build-metadata.tex").write_text(latex_metadata(metadata), encoding="utf-8")
generated = latex_metadata(metadata)
if review_files:
review = json.loads(review_files["review.json"])
def tex(value):
mapping = {"\\": r"\textbackslash{}", "{": r"\{", "}": r"\}",
"_": r"\_", "%": r"\%", "&": r"\&", "#": r"\#", "$": r"\$",
"^": r"\textasciicircum{}", "~": r"\textasciitilde{}"}
return ''.join(mapping.get(c, c) for c in str(value))
fields = {"FinalVersion": args.release_version, "FinalMode": args.mode,
"FinalJenkinsBuild": args.jenkins_build, "FinalStatus": review["status"],
"FinalModel": review["model_id"], "FinalInputTokens": review["input_tokens"],
"FinalOutputTokens": review["output_tokens"]}
generated += r"\renewcommand{\DocumentVersion}{" + args.release_version + "}\n"
generated += r"\renewcommand{\AssignmentTitle}{DevOps Pipeline Final Project}" + "\n"
generated += r"\renewcommand{\AssignmentNumber}{Final}" + "\n"
generated += r"\renewcommand{\DocumentStatus}{" + args.mode + " validation}\n"
for key, value in fields.items():
generated += "\\newcommand{\\" + key + "}{" + tex(value) + "}\n"
(workspace / "final-reviewed.txt").write_bytes(review_files["reviewed.py"])
(workspace / "final-diff.txt").write_text(review["diff"] or "No changes (unchanged review).", encoding="utf-8")
# Generated run data only; the authored report chapter is maintained separately.
appendix = r"""\clearpage
\chapter*{Automated Review Run}
\noindent Release: \FinalVersion\\
Mode: \FinalMode\\
Status: \FinalStatus\\
Model: \FinalModel\\
Input tokens: \FinalInputTokens\\
Output tokens: \FinalOutputTokens\\
Jenkins build: \FinalJenkinsBuild
\section*{Reviewed source}
\lstinputlisting[basicstyle=\ttfamily\small,breaklines=true]{final-reviewed.txt}
\section*{Change log}
\lstinputlisting[basicstyle=\ttfamily\small,breaklines=true]{final-diff.txt}
"""
main_path = workspace / "main.tex"
main_path.write_text(main_path.read_text().replace(r"\end{document}", appendix + r"\end{document}"))
(workspace / "build-metadata.tex").write_text(generated, encoding="utf-8")
# Shell escape is needed by the current minted source. Run only trusted
# team source in the isolated job, with no host/Docker socket mounts.
command = ["latexmk", "-pdf", "-shell-escape", "-interaction=nonstopmode", "-halt-on-error", "-file-line-error", "main.tex"]
+2 -2
View File
@@ -19,9 +19,9 @@
\bottomrule
\endlastfoot
\parbox[t]{2.7cm}{\raggedright November 20, 2026\\ 1.11.0\\ NK, CDX} & Complete remaining mandatory browser workflows and retain minimal deployment limits. & The user directed all server work through the existing SSH connection. Codex inspected official worker code after browser Customer search failed, corrected threaded worker settings, reloaded derived indexes without removing volumes, and verified ticket 71007 through separate TA and Customer browser sessions. Screenshots and sanitized evidence were saved; the authorized temporary local credential copy was removed. No firewall changes or manual PDF compilation were performed. \\
\parbox[t]{2.7cm}{\raggedright November 20, 2026\\ 1.11.1\\ NK, CDX} & Complete browser acceptance and supporting evidence for the Zammad implementation. & Codex corrected scheduler threading and derived search indexes, exercised ticket 71007 through separate TA and Customer browser sessions, captured read-only TA identity/permissions and retained the human-authenticated SSH audit. The team subsequently requested the final TikZ routing, section numbering and draft-text cleanup; these editorial changes and one Gitea manual-only verification build are recorded with version 1.11.1. \\
\parbox[t]{2.7cm}{\raggedright November 18, 2026\\ 1.11.0\\ NK, CDX} & Implement instruction Chapter 7 with minimal resource use and update the newest team manual source. & The user authorized SSH through \texttt{ssw590-codex}, selected the newest documentation branch rather than main, deferred its merge, upgraded the Droplet, requested lower service ceilings, approved synthetic accounts and issue 22, and later requested full ongoing documentation with actual screenshots. Codex deployed the official stack, corrected an initially excessive heap and a Puma worker-setting interpretation, staged initialization, added limits and monitoring, tested tickets/customer isolation/TA access and backup/recovery, and retained explicit evidence limits. A recovery collector was corrected to distinguish real scrape timestamps from query times. The user expressly prohibited PDF compilation until a later authorized Jenkins build. \\
\parbox[t]{2.7cm}{\raggedright November 18, 2026\\ 1.11.0\\ NK, CDX} & Implement instruction Chapter 7 with minimal resource use and update the newest team manual source. Consolidated under the first workday; later browser workflow, read-only role/group checks, SSH audit and source reconciliation retain their actual evidence timestamps. & The user authorized SSH through \texttt{ssw590-codex}, selected the newest documentation branch rather than main, deferred its merge, upgraded the Droplet, requested lower service ceilings, approved synthetic accounts and issue 22, and later requested full ongoing documentation with actual screenshots. Codex deployed the official stack, corrected an initially excessive heap and a Puma worker-setting interpretation, staged initialization, added limits and monitoring, tested tickets/customer isolation/TA access and backup/recovery, and retained explicit evidence limits. A recovery collector was corrected to distinguish real scrape timestamps from query times. The user expressly prohibited PDF compilation until a later authorized Jenkins build. \\
\parbox[t]{2.7cm}{\raggedright November 8, 2026\\ 1.10.1\\ GDL, NK, CDX} & Continue the handoff; verify and document the release and recovery evidence. & Codex checked the merged and later branch work separately, assisted with approved v1 and v2 releases, and recorded immutable digests, scan results, staging idempotence and human production approvals. It orchestrated the approved rollback and staging-only port mismatch, documented the overnight recovery delay, added the HTTPS probe, checked Grafana, and audited archived evidence. The team reviews the manual and evidence. \\
+2 -2
View File
@@ -20,9 +20,9 @@
\bottomrule
\endlastfoot
November 20, 2026 / 1.11.0 & NK, CDX & Corrected scheduler worker semantics to shared-process threads, retained the 384 MiB limit and 128 MiB Elasticsearch heap, repaired derived search indexes and completed real TA browser create/assign/internal-note/public-reply/close on 71007. Added Customer visibility screenshots. Used SSH for server commands; privileged host audit remains pending. Source only; no PDF build. & \ChapterRef{SupportTicketManagement} \\
November 20, 2026 / 1.11.1 & NK, CDX & Completed TA browser create/assign/internal-note/public-reply/close on ticket 71007, verified Customer visibility, and added Agent-only role/group and privileged SSH audit evidence. Final editorial revision clarifies the vector TikZ diagram, normalizes Chapter 14 numbering and removes the closing draft-status text. & \ChapterRef{SupportTicketManagement}, \AppendixRef{AIPromptLog} \\
November 18, 2026 / 1.11.0 & NK, CDX & Added the Support Ticket Management with Zammad chapter for instruction Chapter 7 / team Assignment 9. Recorded official revision, small per-service limits, upgraded-host observations, private HTTPS networking, synthetic accounts/tickets, least-privilege TA API tests, bidirectional issue 22 linkage, backup and isolated recovery evidence. Added actual screenshots and an explicit required-deliverable gap audit. Updated Hosts, password-store hints and AI log. Source-only draft; no PDF compilation authorized. & \ChapterRef{SupportTicketManagement}, \ChapterRef{Hosts}, \ChapterRef{Passwords} \\
November 18, 2026 / 1.11.0 & NK, CDX & Consolidated assignment entry (first workday; evidence retains actual capture dates). Completed browser workflow and role/group evidence, privileged SSH audit, source publication, Hosts and Bitwarden credential references. Added the Support Ticket Management with Zammad chapter for instruction Chapter 7 / team Assignment 9. Recorded official revision, small per-service limits, upgraded-host observations, private HTTPS networking, synthetic accounts/tickets, least-privilege TA API tests, bidirectional issue 22 linkage, backup and isolated recovery evidence. Added actual screenshots and an explicit required-deliverable gap audit. Updated Hosts, password-store hints and AI log. Source-only draft; no PDF compilation authorized. & \ChapterRef{SupportTicketManagement}, \ChapterRef{Hosts}, \ChapterRef{Passwords} \\
November 8, 2026 / 1.10.1 & GDL, NK, CDX & Completed the secure delivery evidence audit, expanded the architecture with actual hosts, volumes and private paths, and linked release records, scans and recovery output. Recorded the v1 and v2 promotions, human decisions, production rollback samples, staging port-mismatch failure and delayed recovery. Added production HTTPS monitoring and preserved its limitation: the probe started after rollback. Recorded the unverified historical scanner database version and stateful rollback limitations. & \ChapterRef{SecureDeliveryRollback}, \ChapterRef{Hosts} \\
+3 -3
View File
@@ -8,14 +8,14 @@ This chapter lists the hosts used in the development environment for this
assignment and any that will be configured in future assignments.
\section{Host Registry}
\begin{tabularx}{\linewidth}{L{3.4cm}L{2.6cm}Y}
\begin{longtable}{L{3.4cm}L{2.6cm}L{7.0cm}}
\caption{Host Registry\label{Table:HostRegistry}}\\
\toprule \textbf{Host Name} & \textbf{Provider} & \textbf{Purpose / Notes}\\ \midrule
\endfirsthead
\multicolumn{3}{l}{\small\itshape Host Registry (continued)}\\
\toprule \textbf{Host Name} & \textbf{Provider} & \textbf{Purpose / Notes}\\ \midrule
\endhead \bottomrule \endlastfoot
\texttt{ssw590-group7-}\newline\texttt{droplet} & DigitalOcean & Ubuntu at \texttt{142.93.193.110}; originally 1 CPU, 1 GB RAM and 25 GB storage. User-confirmed new Basic plan: 1 vCPU, 2 GB RAM, 50 GB disk at \$12/month. November 18 observed root filesystem: 48 GB, plus 2 GB swap. Non-root \texttt{codex} administration. Historical firewall evidence is distinguished from the pending post-upgrade cloud audit. Existing Gitea, Jenkins, proxy, monitoring and pricing services retained. See \ChapterRef{SupportTicketManagement}.\\
\texttt{ssw590-group7-}\newline\texttt{droplet} & DigitalOcean & Ubuntu at \texttt{142.93.193.110}; originally 1 CPU, 1 GB RAM and 25 GB storage. User-confirmed new Basic plan: 1 vCPU, 2 GB RAM, 50 GB disk at \$12/month. November 18 observed root filesystem: 48 GB, plus 2 GB swap. Non-root \texttt{codex} administration. Current cloud rules and attachment are evidenced; November 20 privileged SSH audit confirms UFW inactive and password/keyboard-interactive SSH disabled. Cloud firewall permits inbound 22/80/443; the team's SSH source-IP exception is retained. Existing Gitea, Jenkins, proxy, monitoring and pricing services retained. See \ChapterRef{SupportTicketManagement}.\\
\texttt{gitea} & Existing Droplet & Repository-scoped Actions runner ID 1; temporary TeX jobs on the same host. Team-owned, capacity one, no public runner/compiler ports; runner 192 MiB and jobs 256 MiB. HTTPS to \href{https://myfileagent.tech}{Gitea}; separate Docker bridges. Runner state is outside Git; service health was checked during setup. See \ChapterRef{AutomatedManualBuild}.\\
\texttt{ci.}\allowbreak\texttt{myfileagent.}\allowbreak\texttt{tech} & Existing Droplet & Jenkins 2.580.1 at \href{https://ci.myfileagent.tech/login}{HTTPS login}; public browser access, authentication required. Caddy forwards to \texttt{jenkins:8080} on the private bridge. Host port 8080 is loopback-only; no agent port is published. Team-owned, controller builds, persistent \texttt{jenkins-home}. Login, restart and main build 2 verified October 9, 2026; CI AAAA query returned no address. Named Matrix admin access team-confirmed; public-access approval remains unresolved. At the October 9 baseline, backup/monitoring was not established. Assignment 7 subsequently added HTTPS probes and host monitoring; monitoring does not establish Jenkins backup/restore. See \ChapterRef{JenkinsContinuousIntegration}.\\
\texttt{metrics.}\allowbreak\texttt{myfileagent.}\allowbreak\texttt{tech} & Existing Droplet & Grafana OSS 13.2.4 at \href{https://metrics.myfileagent.tech/login}{HTTPS login}; authentication required, anonymous access and signup disabled in provisioning. Caddy forwards privately to \texttt{grafana:3000}. Persistent Grafana volume; six-panel monitoring and two-panel runbook dashboards; team Discord alert route. See \ChapterRef{SREMonitoringReliability}.\\
@@ -25,4 +25,4 @@ assignment and any that will be configured in future assignments.
\texttt{prometheus} & Existing Droplet & Prometheus v3.15.1 on the private monitoring bridge at port 9090; separate persistent volume, 30-second scrapes, seven-day/512 MB block retention. No public port published.\\
\texttt{node-exporter} & Existing Droplet & Node Exporter v1.12.1, private port 9100; read-only host root/proc/sys and host PID namespace for whole-host CPU, memory and filesystem collectors.\\
\texttt{blackbox-}\allowbreak\texttt{exporter} & Existing Droplet & Blackbox Exporter v0.29.1, private port 9115; probes Gitea/Jenkins HTTPS login URLs with TLS verification. Same-Droplet probes do not prove reachability from all external networks.\\
\end{tabularx}
\end{longtable}
+10 -7
View File
@@ -7,7 +7,7 @@
For security reasons, passwords in this document are stored only as links to another password store (shared BitWarden cloud account), never as the credential itself. When a new credential is created, add a row naming the user and server, add the corresponding entry to the password manager, and record only the password manager's entry name here.
\section{Credential Registry}
\begin{tabularx}{\linewidth}{L{1.8cm}L{2.6cm}L{3.4cm}Y}
\begin{longtable}{L{1.8cm}L{2.6cm}L{3.4cm}L{5.0cm}}
\caption{Credential Registry\label{Table:CredentialRegistry}}\\
\toprule \textbf{User} & \textbf{Server} & \textbf{Credential Reference} & \textbf{Rotation / Notes}\\ \midrule
\endfirsthead
@@ -25,9 +25,12 @@ Group 7 & Actions runner & Restricted state: \texttt{.runner} & Outside Git; mod
\texttt{jenkins-}\allowbreak\texttt{ci} & Jenkins / Gitea & Jenkins credential: \texttt{gitea-}\allowbreak\texttt{jenkins-ci} & Global PAT: repo write; user/org read. Rotate on compromise.\\
Group 7 & Grafana & Bitwarden: \path{bitwarden-grafana} & Never publish the password. The restricted initial-password file outside Git is a bootstrap value and must not be used to reset the changed login.\\
Group 7 & Discord alert route & Restricted \path{grafana-discord-webhook} and private routing provisioning outside Git & Secret URL excluded from source and screenshots. Rotate/revoke through the team Discord integration if compromised; preserve resolved delivery.\\
\texttt{startup.}\allowbreak\texttt{admin} & Zammad support & Private account store outside Git & \path{/home/codex/dos-support/accounts.private.json}, mode 600. Generated administrator login; transfer to team vault before final handoff.\\
\texttt{student.}\allowbreak\texttt{agent} & Zammad support & Same private account store; key \texttt{agent} & Startup Support Agent access only.\\
\texttt{ta.agent} & Zammad support & Same private account store; key \texttt{ta} & Agent role only. Deliver username/password privately in Canvas text, outside PDF/Git; revoke after evaluation window.\\
Synthetic Customers & Zammad portal & Same private account store; keys \texttt{customer}, \texttt{other\_customer} & Synthetic identities for isolation tests; no external email channel.\\
Group 7 & Zammad dependencies & Private deployment \path{.env}, mode 600 & Unique database/superuser/search values, outside team repository. Example contains placeholders only. Do not mistake a configured search password variable for enabled authentication.\\
\end{tabularx}
Startup Admin & Zammad support & Bitwarden: \path{zammad-admin} & Login \path{startup.admin@example.test}; named administrator. Rotate on compromise.\\
\texttt{student.}\allowbreak\texttt{agent} & Zammad support & Bitwarden: \path{zammad-student-agent} & Startup Support Agent access only.\\
\texttt{ta.agent} & Zammad support & Bitwarden: \path{zammad-ta-agent} & Agent role only. Supply privately in Canvas; revoke after evaluation.\\
\texttt{demo.}\allowbreak\texttt{customer} & Zammad portal & Bitwarden: \path{zammad-demo-customer} & Synthetic Customer for portal workflow and visibility tests.\\
\texttt{other.}\allowbreak\texttt{customer} & Zammad portal & Bitwarden: \path{zammad-other-customer} & Separate synthetic Customer for ticket-isolation tests.\\
Zammad database & PostgreSQL & Bitwarden: \path{zammad-postgres} & Private deployment variable \texttt{POSTGRES\_PASS}; excluded from Git.\\
Database superuser & PostgreSQL & Bitwarden: \path{zammad-postgres-superuser} & Private deployment variable \texttt{POSTGRES\_SUPERUSER\_PASS}; excluded from Git.\\
Zammad search & Elasticsearch & Bitwarden: \path{zammad-elasticsearch} & Private deployment variable \texttt{ELASTICSEARCH\_PASS}; the variable does not establish enabled search authentication.\\
\end{longtable}
+137 -60
View File
@@ -2,7 +2,8 @@
\ChapterLabel{SupportTicketManagement}
\index{Zammad}\index{support tickets}\index{least privilege}
\section{Scope, source identity, and evidence boundary}
% Chapter introduction is intentionally unnumbered so the eleven implementation
% sections retain their natural 14.1--14.11 numbering.
This chapter implements Chapter 7 of the instructor's
\path{dosManual-V1.53-1.pdf} as team Assignment 9. Chapter numbers in this
cumulative team manual differ from the instruction manual. The work extends
@@ -19,9 +20,9 @@ which was newer than main. The isolated implementation worktree is
\path{assignment9/ticket-management}. Initial sanitized implementation commit
\texttt{114fb4b} retains the previous manual and adds support configuration and
evidence. Local source is also saved under \path{HW9/team-repository}.
Remote branch publication, independent review and the final Jenkins PDF build
are separate verification steps. The user explicitly instructed that no PDF
be compiled during this source-authoring stage.
The complete manual is compiled by the existing Gitea Actions
\textit{Team manual PDF} workflow. The PDF build stamp identifies the source
revision, run and attempt; the full Jenkins application pipeline is separate.
\begin{devopsNote}[What the evidence establishes]
HTTPS login reachability, API account and ticket operations, customer isolation,
@@ -29,10 +30,10 @@ TA group access, a generated backup, and an nginx-only restart test were
executed. A public login probe does not establish authenticated workflow
correctness. API checks do not substitute for separate customer and TA browser
checks. Browser screenshots are added only after actual observations; the
remaining evidence gaps are listed at the end of this chapter.
historical baseline limitations are stated alongside their source evidence.
\end{devopsNote}
\section{1. Baseline, capacity and preservation of earlier work}
\section{Baseline, capacity and preservation of earlier work}
The initial host had a 24 GB root filesystem with 22 GB used (94\%) and
1.6 GB available. The full upstream stack was downloaded and started; startup
caused severe resource contention and repeated Elasticsearch exits with code
@@ -69,7 +70,30 @@ post-install measurements, not a reconstructed original six-command baseline.
Historical Grafana comparisons provide retained before/after observations
with their collection gaps visible.
\section{2. Official deployment revision and images}
\paragraph{Reuse of the prior assignment's dated baseline.}
The team confirms that no system changes occurred between completion of the
preceding assignment and starting this assignment. Existing evidence can
therefore support continuity of the recorded configuration, while retaining
its original dates. In particular,
\path{documentation/evidence/assignment7/documentation-host-comparison-2026-10-28.json}
records one CPU, Docker 29.8.1, Compose v5.5.1, 1,008,177,152 bytes total RAM,
1,073,737,728 bytes swap, and a 24,883,167,232-byte root filesystem.
Its point-in-time available RAM was 217,042,944 bytes and root available
space was 12,422,406,144 bytes. These dynamic values are October 28 samples,
not measurements taken immediately before the November installation; an
unchanged configuration does not imply unchanged utilization or disk use.
The retained November 18 Grafana screenshots add contemporaneous whole-host
before/startup/after observations, and the recorded pre-resize versus
post-resize capacities support the upgrade comparison. These sources are
used together rather than declaring all baseline evidence absent.
The remaining historical gap is the complete, contemporaneous six-command
capture required by Step 1, especially per-container statistics and network
inventory. A later snapshot or a stopped-Zammad test cannot recreate those
original observations. The plan selected and recurring cost are documented;
a pre-resize comparison of alternative paid plans is not established by
capacity measurements alone.
\section{Official deployment revision and images}
The separate deployment directory is
\path{/home/codex/dos-support/zammad-docker-compose}. The official repository
\url{https://github.com/zammad/zammad-docker-compose} was cloned and detached at
@@ -96,30 +120,47 @@ built. Captured local image IDs, resource caps, service state, networks and
volume mounts are in \path{support/evidence/deployment-manifest.json}.
Local image IDs are not represented as registry manifest digests.
\section{3. Private networks, proxy and minimal settings}
\section{Private networks, proxy and minimal settings}
\begin{figure}[htbp]
\centering
\begin{tikzpicture}[node distance=7mm,
every node/.style={draw,rounded corners,align=center,font=\footnotesize,text width=3.7cm,inner sep=4pt},
arrow/.style={-{Stealth},thick}]
\node (browser) {Customer / student / TA browser};
\node[below=of browser] (proxy) {Existing Caddy :443\\TLS and HTTP redirect};
\node[below=of proxy] (nginx) {Zammad nginx :8080\\existing edge + support network};
\node[below=of nginx] (app) {Rails :3000 / websocket\\scheduler / one-shot init};
\node[left=of app] (old) {Retained Gitea / Jenkins\\pricing staging + production};
\node[right=of app] (data) {PostgreSQL :5432\\Redis :6379 / Memcached :11211\\Elasticsearch :9200};
\node[below=of app] (vol) {Named storage / database / search\\Redis / backup volumes};
\node[right=of vol] (backup) {Official backup container\\private project network};
\node[left=of vol] (monitor) {Existing Prometheus + Blackbox\\Grafana + Node Exporter};
\draw[arrow] (browser)--(proxy);
\draw[arrow] (proxy)--node[right,draw=none,text width=2cm]{private HTTP}(nginx);
\draw[arrow] (nginx)--(app);
\draw[arrow] (app)--(data);
\draw[arrow] (app)--(vol);
\draw[arrow] (backup)--(vol);
\draw[arrow,dashed] (monitor) to[bend left=35] (proxy);
\draw[arrow] (proxy) to[bend right=25] (old);
\begingroup
\linespread{1}\selectfont
\begin{tikzpicture}[
box/.style={draw=devopsBlue,rounded corners=2pt,align=center,
font=\fontsize{10}{13}\selectfont,text width=3.8cm,minimum height=1.6cm,inner sep=6pt,fill=white},
newbox/.style={box,fill=devopsLightBlue},
store/.style={box,fill=black!5},
arrow/.style={-{Stealth[length=2.5mm]},thick,draw=devopsBlue},
edgeLabel/.style={font=\footnotesize,fill=white,inner sep=3pt,align=center}]
% Explicit grid positions reserve separate lanes for every connection.
\node[box] (browser) at (0,0) {Customer / student\\TA browser};
\node[box] (proxy) at (0,-3.2) {Existing Caddy\\TLS :443\\HTTP redirect :80};
\node[box] (old) at (-4.8,-3.2) {Existing Gitea / Jenkins\\Pricing: staging\\and production};
\node[store] (oldvol) at (-4.8,0) {Existing Gitea data\\Jenkins home / TLS storage\\Pricing configuration};
\node[box] (monitor) at (4.8,-3.2) {Prometheus / Blackbox\\Grafana / Node Exporter};
\node[store] (monvol) at (4.8,0) {Metrics history\\Dashboards / alert rules\\Exporter configuration};
\draw[draw=devopsBlue,dashed,rounded corners=4pt]
(-7.05,-15.0) rectangle (7.05,-5.1);
\node[anchor=north west,font=\small\bfseries,text=devopsBlue]
at (-6.85,-5.3) {New Zammad private network};
\node[newbox] (nginx) at (0,-6.9) {Zammad nginx :8080\\Private + proxy networks};
\node[newbox] (app) at (0,-10.1) {Rails :3000 / websocket\\Scheduler / one-shot init};
\node[newbox] (data) at (-4.8,-10.1) {PostgreSQL :5432\\Redis :6379\\Memcached :11211\\Elasticsearch :9200};
\node[newbox] (backup) at (4.8,-10.1) {Official backup container\\Private project network};
\node[store] (vol) at (0,-13.4) {Named database / search / Redis\\Shared application storage\\Backup volumes};
\draw[arrow] (browser.south)--node[edgeLabel,right]{HTTPS}(proxy.north);
\draw[arrow] (proxy.west)--(old.east);
\draw[arrow] (old.north)--(oldvol.south);
\draw[arrow] (monitor.north)--(monvol.south);
\draw[arrow,dashed] (monitor.west)--(proxy.east);
\draw[arrow] (proxy.south)--node[edgeLabel,right]{private HTTP}(nginx.north);
\draw[arrow] (nginx.south)--(app.north);
\draw[arrow] (app.west)--(data.east);
\draw[arrow] (app.south)--(vol.north);
\draw[arrow] (data.south)--(-4.8,-13.4)--(vol.west);
\draw[arrow] (backup.south)--(4.8,-13.4)--(vol.east);
\end{tikzpicture}
\endgroup
\caption{Actual logical service and storage boundaries. Only Zammad nginx
joins \texttt{myfileagent-gitea\_edge}; all dependencies remain on
\texttt{dos-support\_default}. Dashed line is the HTTPS probe through Caddy.
@@ -202,7 +243,25 @@ This records a functional failure that API CRUD and container-running checks
had not detected; the completed browser test is the acceptance check for the
correction, not merely a successful container restart.
\section{4. Validation, initialization and startup operations}
\section{Validation, initialization and startup operations}
\paragraph{Post-build footprint tuning, November 21.}
After manual build 29, the team reported nearly full swap. A current SSH
audit found about 2 GiB swap used with roughly 472 MiB available RAM.
Jenkins, Elasticsearch and the three Zammad Ruby services held most of the
swapped pages; the many Elasticsearch rows were threads of one JVM.
A 96 MiB Elasticsearch heap trial did not complete the bounded primary-shard
recovery check and emitted GC pressure, so the 128 MiB setting was restored.
The saved override sets \texttt{MALLOC\_ARENA\_MAX=2} for Elasticsearch,
Rails, websocket and scheduler, and disables unused Elasticsearch ML.
The existing Jenkins controller heap was reduced from 256 to 192 MiB with
the 448 MiB container cap and persistent home retained. All 83 saved Jenkins
build records had a final result before its restart. No volume was deleted,
swap was not forcibly disabled, and no paid capacity change was made.
Restarts released old swapped pages, which is immediate relief rather than
proof of a lasting reduction; later warm-state measurements are required.
These changes postdate the build-29 artifact and are included in this
version's source configuration and verification record.
Run commands in the deployment directory so the same private environment and
all scenarios are loaded:
\begin{verbatim}
@@ -225,7 +284,7 @@ Rails, then nginx, websocket, scheduler and backup. Check actual readiness,
not just container state. Puma's zero-worker mode means one process; an early
saved value of one was corrected before this constrained deployment.
\section{5. DNS, HTTPS and certificate verification}
\section{DNS, HTTPS and certificate verification}
\url{https://support.myfileagent.tech/} resolves to the existing Droplet
\texttt{142.93.193.110}. A new hostname route was appended to the existing
Caddyfile; all prior host routes were preserved:
@@ -254,7 +313,7 @@ No password fields are populated in this screenshot. A login page alone does
not establish successful authenticated access.}\label{Figure:ZammadLogin}
\end{figure}
\section{6. Firewall and exposure checks}
\section{Firewall and exposure checks}
External TCP connection attempts from the Windows workstation could not reach
\texttt{142.93.193.110} on 8080, 5432, 9200, 6379 or 11211. These are
observations from that source and time, not a universal connectivity proof.
@@ -266,7 +325,7 @@ Earlier team evidence recorded a DigitalOcean Cloud Firewall permitting
22/80/443, UFW inactive and IPv6 disabled. Those historical observations are
not relabeled as a new post-upgrade firewall audit. A current authenticated
DigitalOcean inspection now confirms the cloud firewall and attachment;
privileged host firewall rules remain a separate pending check. The earlier Gitea foundation chapter records an
the privileged host audit was subsequently completed on November 20. The earlier Gitea foundation chapter records an
instructor-cleared exception allowing key-only SSH from changing source
addresses. The team explicitly carries that policy forward; no SSH source-IP
restriction was requested or applied in this assignment. Verify the actual
@@ -274,9 +333,23 @@ key-only controls and retain that exception rather than claiming IP filtering.
The final
observation found no support AAAA answer and no global IPv6 interface address;
listeners on \texttt{[::]} alone do not establish public IPv6 access.
A current read-only UFW status attempt was blocked because sudo requires a
password; the failure is retained in \path{chapter7-final-audit.json} and is
not presented as proof that UFW is enabled or disabled.
The original unprivileged UFW attempt failed because sudo required a password;
that historical failure remains in \path{chapter7-final-audit.json}.
The team then authenticated the read-only audit through SSH. Its raw output is
\path{support/evidence/host-security-audit.txt}, captured November 20 at
20:33:14 EST (November 21, 01:33:14 UTC). UFW is inactive. IPv4 INPUT and
OUTPUT policies are ACCEPT, FORWARD is DROP, with Docker-managed bridge
and forwarding chains. IPv6 base policies are ACCEPT. Therefore the host
firewall is not an independent inbound port allowlist; the attached cloud
firewall supplies that restriction. Docker ACCEPT entries for private
container ports do not alone prove public exposure; published bindings and
external checks are recorded separately below.
Effective \texttt{sshd -T} output reports
\texttt{pubkeyauthentication yes}, \texttt{passwordauthentication no},
\texttt{kbdinteractiveauthentication no}, and
\texttt{permitemptypasswords no}. Root login is
\texttt{without-password} (keys permitted), not disabled. No rules or SSH
settings were changed during this audit.
The renewed external checks are in
\path{support/evidence/firewall-exposure-recheck.json}: HTTPS returned 200,
all five internal TCP ports timed out from the external workstation, none of
@@ -308,7 +381,7 @@ the same firewall whose complete rules are captured in the preceding figure.}
Do not add public rules for Zammad dependencies or monitoring ports. Keep
80 only for the existing redirect/certificate mechanism and HTTPS on 443.
\section{7. Accounts, ticket workflow and least privilege}
\section{Accounts, ticket workflow and least privilege}
The created local accounts are \texttt{startup.admin}, \texttt{student.agent},
\texttt{ta.agent}, \texttt{demo.customer}, and \texttt{other.customer}; all
use synthetic \texttt{example.test} email identities. TA Agent has only the
@@ -319,6 +392,7 @@ address was configured.
\begin{longtable}{L{1.6cm}L{5.1cm}L{6.4cm}}
\caption{Synthetic ticket examples and observed workflow}\label{Table:ZammadTickets}\\
\toprule Number & Example & Observed result\\\midrule\endfirsthead
\toprule Number & Example & Observed result\\\midrule\endhead
71002 & Portal access question & Open/unassigned; Demo Customer; normal priority.\\
71003 & Pricing investigation & Open, Student Agent owner, Demo Customer, normal priority; internal note and public reply.\\
@@ -359,14 +433,30 @@ engineering issue link, without administrator access.}
\label{Figure:ZammadTAResolved}\end{figure}
\subsection{Private TA access and evaluation checklist}
The November 20 administrator browser inspection opened TA Agent's existing
profile read-only: Agent selected, Admin and Customer unchecked, Startup
Support Full permission, and active status. The dialog was canceled without
submission. The administrator signs in using
\texttt{startup.admin@example.test}; the originally generated
\texttt{startup.admin} identifier was not accepted by the login form.
Use the email identifier with the existing private password; no credential
was reset or replaced.
\begin{figure}[htbp]\centering
\includegraphics[width=.47\linewidth]{hw9_images/ta-agent-profile.png}\hfill
\includegraphics[width=.47\linewidth]{hw9_images/ta-agent-role-group.png}
\caption{Read-only TA Agent identity (left) and Agent-only role with Full
Startup Support ticket permissions (right). No access settings were changed.}
\label{Figure:ZammadTARoleGroup}\end{figure}
Evaluation URL: \url{https://support.myfileagent.tech/}. Login name:
\texttt{ta.agent}; display name: TA Agent. The separate generated passwords
are stored privately in
\path{/home/codex/dos-support/accounts.private.json} with mode 600, outside Git.
Actual database secrets are in the private deployment environment. Add vetted
password-manager references after the team transfers them; no vault entry is
claimed to exist yet. The user requested that the password handoff, Droplet
upgrade/price and Hosts chapter be reviewed together at documentation review.
Actual database secrets are in the private deployment environment.
The Passwords chapter defines the team's Bitwarden reference names for all
five Zammad accounts and three deployment secret variables. Those names
are the credential handoff convention; secret values remain outside this manual.
The Basic plan is 1 vCPU, 2 GB RAM and 50 GB disk at \$12/month.
The approved temporary local credential copy was removed after browser tests;
the Droplet's private store is retained. Supply the TA username and password privately in Canvas
submission text, outside the PDF and repository, as required by the manual.
@@ -379,7 +469,7 @@ TA login available through the announced grading window; its dates have not
been supplied. Revoke temporary access only after grading and retention needs
are confirmed.
\section{8. Engineering traceability and resolution}
\section{Engineering traceability and resolution}
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/22}{Gitea issue 22}
is titled ``Verify resource-limited Zammad HTTPS support deployment.'' It was
created as \texttt{nkogut} after explicit team approval and links back to
@@ -400,7 +490,7 @@ review/check workflow remain applicable to implementation source publication.
\label{Figure:ZammadEngineeringIssue}
\end{figure}
\section{9. Existing monitoring extension}
\section{Existing monitoring extension}
The support root URL was appended to the existing Prometheus \texttt{https}
job. The Gitea, Jenkins and production application targets, \texttt{/probe}
path, \texttt{http\_2xx} module, 30-second interval and relabeling were retained.
@@ -470,7 +560,7 @@ this is not per-container usage.}\label{Figure:ZammadHostMemory}\end{figure}
increase is interpreted alongside the changed disk capacity, not as disk
space reclaimed by stopping a container.}\label{Figure:ZammadHostDisk}\end{figure}
\section{10. Controlled outage, persistence and backup}
\section{Controlled outage, persistence and backup}
The isolated test stopped only \texttt{zammad-nginx}, then restarted it in a
\texttt{finally} recovery path. No volume was removed. The first collector
used query-evaluation timestamps; because different query times do not prove
@@ -586,32 +676,19 @@ state; the internal TA note is excluded from the conversation.}
\label{fig:customerBrowserClosedReply}
\end{figure}
\section{11. Deliverable coverage, final rechecks and remaining gaps}
\section{Deliverable coverage, final rechecks and remaining gaps}
\begin{longtable}{L{3.2cm}L{6.2cm}L{3.4cm}}
\caption{Required Chapter 7 deliverable audit}\label{Table:ZammadCoverage}\\
\toprule Required aspect & Saved evidence / chapter location & Verification boundary\\\midrule\endfirsthead
\toprule Required aspect & Saved evidence / chapter location & Verification boundary\\\midrule\endhead
Deployment / continuity & Revision, images, manifest, architecture, final HTTPS observations & All six HTTPS checks returned 200\\
Capacity and versions & Initial observations, user-confirmed Basic 1 vCPU/2 GB/50 GB at \$12/month, explicit limits & Full pre-install command baseline cannot be reconstructed\\
Persistence / backups & Named volume manifest, backup success, retained ticket/conversation & Database restore not tested\\
HTTPS / exposure & Certificate, redirect, blocked ports, private networks, current cloud rules/attachment, no global IPv6/AAAA & Privileged host-rule audit pending\\
HTTPS / exposure & Certificate, redirect, blocked ports, private networks, cloud rules/attachment, privileged host audit and effective SSH & UFW inactive; cloud firewall restricts inbound ports\\
Accounts / TA & Agent-only TA/group access, API CRUD 71006, browser workflow 71007 & Browser create, assign, internal/public reply and close verified\\
Three ticket examples & Open 71002, assigned 71003, closed 71004; internal note/public reply & Browser visibility/isolation screenshots included\\
Engineering link & Issue 22 and ticket 71004 bidirectional link, resolution note, screenshot & Issue remains open\\
Monitoring & Existing job, three displayed panels, successful probe and host comparison & Authenticated Grafana screenshots included\\
Recovery graph & Corrected timestamps, source graph, Grafana recovery window, retained conversation & Two failed distinct scrapes and recovery verified\\
Manual / source & This chapter, Hosts, password hints, history, AI log, sanitized configuration & No PDF compiled; final Jenkins artifact pending\\\bottomrule
Manual / source & This chapter, Hosts, password hints, history, AI log, sanitized configuration & Versioned source; PDF build identity in the build stamp\\\bottomrule
\end{longtable}
Every pending item is a required evidence follow-up, not an optional extra or
an assertion of completion. Before submission: review the saved TA
browser evidence for ticket 71007 (create, assign, internal/public
reply and close are now exercised through the portal);
finish privileged host-rule and effective key-only SSH evidence; current cloud
rules and attachment screenshots are now included;
review the password handoff and updated Hosts chapter together with the team
as requested (plan/price now supplied); record the grading window; publish reviewed source; provide TA
credentials privately; and run the user-authorized Jenkins PDF build followed
by visual and reference verification. Do not submit this unbuilt source draft
as a verified final PDF. After grading, retain evidence and the manual, revoke
temporary TA access, and obtain team approval before stopping paid resources
or changing costs. Existing services and their storage remain team-owned.
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+3 -3
View File
@@ -51,15 +51,15 @@
% Replace these values for each assignment.
\newcommand{\AssignmentTitle}{Support Ticket Management with Zammad}
\newcommand{\AssignmentNumber}{9}
\newcommand{\DocumentVersion}{1.11.0}
\newcommand{\DocumentStatus}{Implementation evidence draft; PDF build pending}
\newcommand{\DocumentVersion}{1.11.1}
\newcommand{\DocumentStatus}{Final submission}
\newcommand{\CourseNumber}{SSW 590}
\newcommand{\CourseName}{DevOps Principles and Practices}
\newcommand{\Instructor}{Darian Muresan}
\newcommand{\StudentNames}{Nicholas Kogut\\Gowri Das Lovely}
\newcommand{\PDFAuthors}{Nicholas Kogut and Gowri Das Lovely}
\newcommand{\Organization}{Stevens Institute of Technology}
\newcommand{\DocumentDate}{November 18, 2026}
\newcommand{\DocumentDate}{November 20, 2026}
\newcommand{\DueDate}{Not specified}
% Generated only in the build workspace; never committed by the workflow.
\newcommand{\BuildSuffix}{+local.unverified}
+24
View File
@@ -0,0 +1,24 @@
Final-project monitoring integration — prepared, not deployed
Use Member 1's measured live review metadata only. The metric adapter is:
python3 ci/final_project.py metrics --review-dir VERIFIED_LIVE_DIRECTORY \
--completed-at MEASURED_COMPLETION_EPOCH --output DIRECTORY/final-project.prom
Coordinate a dedicated host directory and readonly mount into Node Exporter.
Enable --collector.textfile and --collector.textfile.directory=/textfiles
in addition to the existing cpu, meminfo and filesystem collectors. Do not
replace the existing deployment Compose file with an unverified template.
The job's Actions container currently has no host-volume access. Use the
trusted integration step to transfer validated metrics to that host directory.
Validate with Node Exporter target health and node_textfile_scrape_error == 0.
Retain last-run gauges through at least two 30-second scrapes. Unknown counts
are omitted and explicitly represented by *_available == 0. Do not substitute
zero tokens for an unknown count. Refresh/remove stale samples intentionally.
Import/provision dashboard.json after review. Keep existing dashboard copies
in sync where the existing monitoring deployment requires it. Add annotations
for source SHA, Actions run/attempt and Jenkins build; use a fixed window.
Fixture metrics must not populate the live panels. Shared-host CPU includes
Zammad, pricing and other services. Record baseline and after observations;
do not manufacture load or claim per-model RSS from host available memory.
+189
View File
@@ -0,0 +1,189 @@
{
"title": "SSW590 final project \u2014 live evidence",
"uid": "ssw590-final-project",
"schemaVersion": 39,
"version": 1,
"timezone": "America/New_York",
"refresh": "30s",
"time": {
"from": "now-15m",
"to": "now"
},
"panels": [
{
"id": 1,
"title": "Live input tokens",
"type": "timeseries",
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 8
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"targets": [
{
"expr": "review_input_tokens{mode=\"live\"}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short"
},
"overrides": []
}
},
{
"id": 2,
"title": "Live output tokens",
"type": "timeseries",
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 8
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"targets": [
{
"expr": "review_output_tokens{mode=\"live\"}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short"
},
"overrides": []
}
},
{
"id": 3,
"title": "Host CPU",
"type": "timeseries",
"gridPos": {
"x": 0,
"y": 8,
"w": 12,
"h": 8
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"targets": [
{
"expr": "100 * (1 - avg by(instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[2m])))",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "percent"
},
"overrides": []
}
},
{
"id": 4,
"title": "Available host memory",
"type": "timeseries",
"gridPos": {
"x": 12,
"y": 8,
"w": 12,
"h": 8
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"targets": [
{
"expr": "node_memory_MemAvailable_bytes{job=\"node\"}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "bytes"
},
"overrides": []
}
},
{
"id": 5,
"title": "Token count availability",
"type": "timeseries",
"gridPos": {
"x": 0,
"y": 16,
"w": 12,
"h": 8
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"targets": [
{
"expr": "review_input_tokens_available{mode=\"live\"} or review_output_tokens_available{mode=\"live\"}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short"
},
"overrides": []
}
},
{
"id": 6,
"title": "Seconds since review completed",
"type": "timeseries",
"gridPos": {
"x": 12,
"y": 16,
"w": 12,
"h": 8
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"targets": [
{
"expr": "time() - review_completed_timestamp_seconds{mode=\"live\"}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "s"
},
"overrides": []
}
}
],
"templating": {
"list": [
{
"name": "DS_PROMETHEUS",
"type": "datasource",
"query": "prometheus",
"label": "Prometheus"
}
]
},
"annotations": {
"list": []
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ services:
container_name: myfileagent-jenkins
restart: unless-stopped
environment:
JAVA_OPTS: "-Xms64m -Xmx256m"
JAVA_OPTS: "-Xms64m -Xmx192m"
mem_limit: 448m
ports:
- "127.0.0.1:8080:8080"
+25
View File
@@ -0,0 +1,25 @@
{
"review_date_local": "2026-11-20",
"timezone": "America/New_York",
"verified_published_commit": "98a3a6d39e438e7fef7579f4f695687aa0a5b5e7",
"completed_since_original_remaining_steps_pdf": [
"Privileged host firewall and effective SSH audit collected via SSH",
"TA browser create, assign, internal note, public reply and close: ticket 71007",
"Separate Customer browser confirms public reply and closed state with internal note excluded",
"Administrator read-only TA identity, Agent-only role and Startup Support Full permission screenshots",
"Source branch and immutable configuration, chapter and screenshot links verified",
"Hosts audit status reconciled; multipage table environment corrected"
],
"administrator_login": "startup.admin@example.test",
"credential_handling": "Generated passwords remain in private droplet store; temporary local copies removed; no password reset",
"remaining": [
{"item":"Publish this final source reconciliation commit","input":"Existing Gitea credentials through the prepared SSH helper"},
{"item":"Team review of Hosts and private password handoff","input":"Team confirmation and approved password-manager destination"},
{"item":"Record grading availability window","input":"Instructor/team dates"},
{"item":"Build and visually verify the final manual PDF","input":"Explicit user authorization and selected Jenkins manual-build job; currently prohibited"},
{"item":"Final Canvas PDF submission and private TA credentials","input":"Human submission after verified build"},
{"item":"Retire temporary access after evaluation","input":"Confirmation grading ended; no current revocation authorized"}
],
"historical_limitations": ["Full pre-install baseline and original plan comparison were not captured at the required time; existing historical evidence retained without reconstruction"],
"not_performed": ["PDF compilation", "firewall changes", "credential reset", "database restore", "main merge", "post-grading account revocation"]
}
@@ -0,0 +1,40 @@
{
"captured_at": "2026-11-21T23:20:20.995604+00:00",
"trial_96m": "Rejected: prolonged startup, primary-shard recovery timeout, red cluster; restored 128 MiB",
"retained_changes": {
"elasticsearch_heap_mib": 128,
"elasticsearch_ml_enabled": false,
"malloc_arena_max": 2,
"jenkins_heap_mib": 192
},
"initial_observations": {
"swap_used_approx_mib": 2042,
"available_ram_approx_mib": 472
},
"https": {
"https://support.myfileagent.tech/": 200,
"https://ci.myfileagent.tech/login": 200,
"https://myfileagent.tech/user/login": 200,
"https://metrics.myfileagent.tech/login": 200,
"https://app.myfileagent.tech/health": 200,
"https://staging.myfileagent.tech/health": 200
},
"ta_ticket_read": {
"number": "71007",
"state_id": 4,
"owner_id": 5
},
"customer_search_found": true,
"customer_visibility": {
"article_ids": [
12,
14
],
"internal_marker_absent": true
},
"free": " total used free shared buff/cache available\nMem: 1.9Gi 1.5Gi 134Mi 10Mi 432Mi 385Mi\nSwap: 2.0Gi 1.6Gi 407Mi\n",
"vmstat": "procs -----------memory---------- ---swap-- -----io---- -system-- -------cpu-------\n r b swpd free buff cache si so bi bo in cs us sy id wa st gu\n 1 1 1680056 137692 1648 442740 478 447 920 499 1465 28 22 7 67 2 2 0\n 0 0 1670840 137692 1648 446688 12156 0 16120 0 2981 6696 11 8 69 11 0 0\n 0 0 1670584 137692 1648 446688 36 0 36 0 963 1224 5 1 94 0 0 0\n",
"container_stats": "dos-support-zammad-scheduler-1 CPU=0.35% RAM=120.5MiB / 384MiB\ndos-support-zammad-websocket-1 CPU=0.03% RAM=109.2MiB / 192MiB\nmyfileagent-jenkins CPU=0.61% RAM=68.26MiB / 448MiB\ndos-support-zammad-railsserver-1 CPU=9.24% RAM=105.9MiB / 384MiB\ndos-support-zammad-elasticsearch-1 CPU=23.37% RAM=363.5MiB / 384MiB\ndos-support-zammad-backup-1 CPU=0.00% RAM=628KiB / 192MiB\ndos-support-zammad-nginx-1 CPU=0.00% RAM=1.602MiB / 64MiB\ndos-support-zammad-postgresql-1 CPU=0.45% RAM=38.42MiB / 128MiB\ndos-support-zammad-redis-1 CPU=0.27% RAM=4.398MiB / 48MiB\ndos-support-zammad-memcached-1 CPU=3.70% RAM=2.676MiB / 32MiB\npricing-staging-app-1 CPU=0.01% RAM=8.309MiB / 1.922GiB\npricing-production-app-1 CPU=0.02% RAM=12.46MiB / 1.922GiB\nassignment8-jenkins-agent CPU=0.55% RAM=19.9MiB / 256MiB\nmyfileagent-monitoring-grafana-1 CPU=0.98% RAM=112.2MiB / 1.922GiB\nmyfileagent-monitoring-prometheus-1 CPU=0.26% RAM=49.15MiB / 160MiB\nmyfileagent-monitoring-blackbox-exporter-1 CPU=0.00% RAM=21.48MiB / 32MiB\nmyfileagent-monitoring-node-exporter-1 CPU=0.00% RAM=18.32MiB / 32MiB\nmyfileagent-gitea CPU=0.16% RAM=125.2MiB / 1.922GiB\nmyfileagent-manual-runner CPU=0.00% RAM=9.566MiB / 192MiB\nmyfileagent-caddy CPU=0.00% RAM=24.45MiB / 1.922GiB\n",
"es_health": "{\"status\":\"yellow\",\"timed_out\":false,\"active_primary_shards\":29,\"unassigned_shards\":27}",
"es_user_count": "{\"count\":6,\"_shards\":{\"total\":1,\"successful\":1,\"skipped\":0,\"failed\":0}}"
}
+161
View File
@@ -0,0 +1,161 @@
Sat Nov 21 01:33:14 UTC 2026
Status: inactive
-P INPUT ACCEPT
-P FORWARD DROP
-P OUTPUT ACCEPT
-N DOCKER
-N DOCKER-BRIDGE
-N DOCKER-CT
-N DOCKER-FORWARD
-N DOCKER-INTERNAL
-N DOCKER-USER
-A FORWARD -j DOCKER-USER
-A FORWARD -j DOCKER-FORWARD
-A DOCKER -d 172.20.0.4/32 ! -i br-86ed1c3d2d9e -o br-86ed1c3d2d9e -p tcp -m tcp --dport 8080 -j ACCEPT
-A DOCKER -d 172.20.0.3/32 ! -i br-86ed1c3d2d9e -o br-86ed1c3d2d9e -p tcp -m tcp --dport 3000 -j ACCEPT
-A DOCKER -d 172.19.0.2/32 ! -i br-b6a036ce8755 -o br-b6a036ce8755 -p tcp -m tcp --dport 443 -j ACCEPT
-A DOCKER -d 172.19.0.2/32 ! -i br-b6a036ce8755 -o br-b6a036ce8755 -p tcp -m tcp --dport 80 -j ACCEPT
-A DOCKER ! -i br-fafffed2f151 -o br-fafffed2f151 -j DROP
-A DOCKER ! -i br-86ed1c3d2d9e -o br-86ed1c3d2d9e -j DROP
-A DOCKER ! -i br-92f4e2c7b300 -o br-92f4e2c7b300 -j DROP
-A DOCKER ! -i br-b6a036ce8755 -o br-b6a036ce8755 -j DROP
-A DOCKER ! -i br-beb046825b96 -o br-beb046825b96 -j DROP
-A DOCKER ! -i br-dbaf723249ad -o br-dbaf723249ad -j DROP
-A DOCKER ! -i br-f00e1e54e815 -o br-f00e1e54e815 -j DROP
-A DOCKER ! -i docker0 -o docker0 -j DROP
-A DOCKER-BRIDGE -o br-fafffed2f151 -j DOCKER
-A DOCKER-BRIDGE -o br-86ed1c3d2d9e -j DOCKER
-A DOCKER-BRIDGE -o br-92f4e2c7b300 -j DOCKER
-A DOCKER-BRIDGE -o br-b6a036ce8755 -j DOCKER
-A DOCKER-BRIDGE -o br-beb046825b96 -j DOCKER
-A DOCKER-BRIDGE -o br-dbaf723249ad -j DOCKER
-A DOCKER-BRIDGE -o br-f00e1e54e815 -j DOCKER
-A DOCKER-BRIDGE -o docker0 -j DOCKER
-A DOCKER-CT -o br-fafffed2f151 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-CT -o br-86ed1c3d2d9e -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-CT -o br-92f4e2c7b300 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-CT -o br-b6a036ce8755 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-CT -o br-beb046825b96 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-CT -o br-dbaf723249ad -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-CT -o br-f00e1e54e815 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-CT -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A DOCKER-FORWARD -j DOCKER-CT
-A DOCKER-FORWARD -j DOCKER-INTERNAL
-A DOCKER-FORWARD -j DOCKER-BRIDGE
-A DOCKER-FORWARD -i br-fafffed2f151 -j ACCEPT
-A DOCKER-FORWARD -i br-86ed1c3d2d9e -j ACCEPT
-A DOCKER-FORWARD -i br-92f4e2c7b300 -j ACCEPT
-A DOCKER-FORWARD -i br-b6a036ce8755 -j ACCEPT
-A DOCKER-FORWARD -i br-beb046825b96 -j ACCEPT
-A DOCKER-FORWARD -i br-dbaf723249ad -j ACCEPT
-A DOCKER-FORWARD -i br-f00e1e54e815 -j ACCEPT
-A DOCKER-FORWARD -i docker0 -j ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N DOCKER
-N DOCKER-BRIDGE
-N DOCKER-CT
-N DOCKER-FORWARD
-N DOCKER-INTERNAL
-N DOCKER-USER
-A FORWARD -j DOCKER-USER
-A FORWARD -j DOCKER-FORWARD
-A DOCKER-FORWARD -j DOCKER-CT
-A DOCKER-FORWARD -j DOCKER-INTERNAL
-A DOCKER-FORWARD -j DOCKER-BRIDGE
port 22
addressfamily any
listenaddress [::]:22
listenaddress 0.0.0.0:22
usepam yes
logingracetime 120
x11displayoffset 10
maxauthtries 6
maxsessions 10
clientaliveinterval 0
clientalivecountmax 3
requiredrsasize 1024
streamlocalbindmask 0177
unusedconnectiontimeout none
permitrootlogin without-password
ignorerhosts yes
ignoreuserknownhosts no
hostbasedauthentication no
hostbasedusesnamefrompacketonly no
pubkeyauthentication yes
kerberosauthentication no
kerberosorlocalpasswd yes
kerberosticketcleanup yes
gssapiauthentication no
gssapicleanupcredentials yes
gssapikeyexchange no
gssapistrictacceptorcheck yes
gssapistorecredentialsonrekey no
gssapikexalgorithms gss-group14-sha256-,gss-group16-sha512-,gss-nistp256-sha256-,gss-curve25519-sha256-,gss-group14-sha1-,gss-gex-sha1-
passwordauthentication no
kbdinteractiveauthentication no
printmotd no
printlastlog yes
x11forwarding yes
x11uselocalhost yes
permittty yes
permituserrc yes
strictmodes yes
tcpkeepalive yes
permitemptypasswords no
compression yes
gatewayports no
usedns no
allowtcpforwarding yes
allowagentforwarding yes
disableforwarding no
allowstreamlocalforwarding yes
streamlocalbindunlink no
fingerprinthash SHA256
exposeauthinfo no
debianbanner yes
pidfile /run/sshd.pid
modulifile /etc/ssh/moduli
xauthlocation /usr/bin/xauth
ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
banner none
forcecommand none
chrootdirectory none
trustedusercakeys none
revokedkeys none
securitykeyprovider internal
authorizedprincipalsfile none
versionaddendum none
authorizedkeyscommand none
authorizedkeyscommanduser none
authorizedprincipalscommand none
authorizedprincipalscommanduser none
hostkeyagent none
kexalgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
casignaturealgorithms ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
hostbasedacceptedalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
hostkeyalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
pubkeyacceptedalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
loglevel INFO
syslogfacility AUTH
authorizedkeysfile .ssh/authorized_keys .ssh/authorized_keys2
hostkey /etc/ssh/ssh_host_rsa_key
hostkey /etc/ssh/ssh_host_ecdsa_key
hostkey /etc/ssh/ssh_host_ed25519_key
acceptenv LANG
acceptenv LC_*
authenticationmethods any
channeltimeout none
subsystem sftp /usr/lib/openssh/sftp-server
maxstartups 10:30:100
persourcemaxstartups none
persourcenetblocksize 32:128
permittunnel no
ipqos lowdelay throughput
rekeylimit 0 0
permitopen any
permitlisten any
permituserenvironment no
pubkeyauthoptions none
+10
View File
@@ -0,0 +1,10 @@
# Build: docker build --pull=false -t myfileagent-jenkins-python:2.580.1 support/jenkins-runtime
# Deployment: compose.jenkins.yaml image: myfileagent-jenkins-python:2.580.1
# Retain jenkins-home, JAVA_OPTS=-Xms64m -Xmx192m and the 448m container limit.
# Python must be in the image: packages installed only in a running container
# disappear when Compose recreates that container. Jenkinsfile remains unchanged.
FROM jenkins/jenkins@sha256:a660310e39ade10631f774bacd5219de767dfd08947ea5c32a739b5e5bb382c1
USER root
RUN apt-get update && apt-get install -y --no-install-recommends python3 && rm -rf /var/lib/apt/lists/*
USER jenkins
RUN python3 --version
+12
View File
@@ -5,5 +5,17 @@ services:
command: [redis-server, --maxmemory, 16mb, --maxmemory-policy, noeviction]
zammad-railsserver:
environment:
MALLOC_ARENA_MAX: "2"
MIN_THREADS: "1"
MAX_THREADS: "3"
zammad-elasticsearch:
environment:
xpack.ml.enabled: "false"
MALLOC_ARENA_MAX: "2"
zammad-scheduler:
environment:
MALLOC_ARENA_MAX: "2"
zammad-websocket:
environment:
MALLOC_ARENA_MAX: "2"