Agent Parser Live Deploy Snapshot
Use this skill only for the current in-flight rollout continuation.
Snapshot
origin/mainnow also includesa208ad9:- Threat Stream
Rescanned/Improved/Worsenedbadges now key off actual user-driven reanalyze markers instead of genericcontext_analysispresence - treat
manual_rescan_attempt_countorcontext_analysis.re_scan_trigger in {"manual","batch"}as the rescan truth source; do not infer re-scan just because a row has context analysis
- Threat Stream
origin/mainnow also includesb771369:- vLLM 16k context overflow auto-adjust now works against the current sidecar path
http://127.0.0.1:8000/v1 - manual
/v1/reanalyzenow auto-tagsHITLwhen input had to be truncated to fit model context
- vLLM 16k context overflow auto-adjust now works against the current sidecar path
origin/mainincludes:eeb6f28unified scan refactorf0e1667model-api vLLM sidecar layout9b97faddeploy/render defaults cleanup
- source of truth repo is
/home/kevin/projects/agent_parseronpgpu;/Users/1110847/Documents/AWS MIGRATION/agent_parser_patchis only a local reference snapshot and should not be treated as the production worktree - GPU host root volume had to be increased to
200 GiBbecausevllmandmodel-apiimage layers together could exhaust the old host disk during pull/register - one ASG recycle still launched hosts with old ECS bootstrap user-data (
systemctl enable --now ecs), which leftecs.serviceinactive until the launch template was corrected and hosts were recycled again - model-api caller endpoint is the internal ALB, not legacy internal hostnames
- sidecar rollout should require
model-apiredeploy only - app needs fresh tasks whenever
DATABASE_URLsecret content changes - one healthy model-api task proved the EFS-backed HF cache is populated, and the healthy container exposed a real snapshot path under
/root/.cache/huggingface/hub/models--Qwen--Qwen3.5-9B/snapshots/ agent-parser-model-api:23remains the known-good AWS model-api baseline for EFS-backed HF cache behavior;:24drifted back toward Hugging Face lookups because the render path was still able to omit offline envsmodel-apirenderer/deployer hardening landed inorigin/mainvia7449ae3,74383fe, and0d07dd8: EFS mode now defaultsHF_HUB_OFFLINE=1/TRANSFORMERS_OFFLINE=1, normalizesNone/nullsecret selectors to empty, anddeploy.sh model-apire-renders plus validates offline envs before registering a task definition- the safest immediate rollback/redeploy pattern is still: treat live
agent-parser-model-api:23as source of truth and register a new revision by swapping only themodel-apiimage tag; the renderer does not literally inherit ECS:23unless you clone it yourself - multi-AZ is now active for model-api and scheduler, but
scan_reasoning504warnings pre-dated multi-AZ and should be treated as a pre-existing quality/performance issue, not a new HA regression - one intermittent scheduler-to-model-api
504 Gateway Timeoutcan be persisted asrescan_errorwhile the original fast-stage decision is still stored; historical rows can stay if the error is not still recurring - queue saturation is now directly evidenced in
/metrics:model_api_queue_timeouts_total{task_type="scan_reasoning"},pending_reasoning,oldest_job_age_seconds, anddeadlettercan rise even when the ALB target is healthy - the important topology correction is that AWS model-api tasks still use a shared
REDIS_URLqueue; the dominant AWS/pgpu difference is not “local per-instance queue”, but the front door and caller topology: pgpu uses NGINXleast_connwith300sproxy timeouts plus a direct two-endpoint pool, while AWS callers currently collapse to a single internal ALB URL origin/mainnow also includes7c4a601, which reduces scheduler ledger polling overhead and changes the scheduler render default toCOMPLIANCE_ANALYSIS_JOB_CLAIM_LIMIT=128- rendered scheduler task definitions can still lag that source default; if
deployment/rendered/ecs-task-definition-scheduler.prod.jsonstill says32, rerender or explicitly passCOMPLIANCE_ANALYSIS_JOB_CLAIM_LIMIT=128before deploy - direct-vs-ledger synthetic comparison on
pgpushowed the current Aurora-backed analysis ledger adds roughly+1.9sto+2.6sfixed overhead per256items, so current AWS slowdown should be treated as scheduler ledger/poll overhead before blaming raw/v1/scanlatency - the current distributed run lock does not do a short retry loop; an instance that loses the lock normally retries only on its next
30minute schedule tick unless the process restarts or a manual run is triggered - app healthcheck failures were traced to ECS/Docker liveness hitting
/health; app now has a/readyzsplit in commited39608, but rendered task definitions must be regenerated before deploy becausedeployment/rendered/ecs-task-definition-app.prod.jsoncan lag the template - app dashboard is served by the same FastAPI process on port
8000; current public exposure work usesagent-parser-public-albplusagent-parser-public-tg - Redis
hash value is not an integerwarnings now most likely come from staleta:*:summaryorta:overall:summarypreagg keys because startup only rebuilds stats-only preagg, not TA preagg - one real production failure bucket was internal model-api ALB SG drift: listener
8001and TG could both be healthy while app still failed withInference API unreachable (all endpoints): All connection attempts failedbecause the ALB SG did not allow the actual app task SG - another real production failure bucket was vLLM context overflow surfacing as
/v1/scan500:- old clipping logic only ran when the base URL literally contained
vllm - old overflow parsing only matched legacy vLLM wording, not
You passed ... maximum input length ...
- old clipping logic only ran when the base URL literally contained
- at least one ECS service currently showed
minimumHealthyPercent=0,maximumPercent=100; with that configuration--force-new-deploymentis allowed to stop old tasks before the replacement is healthy - dashboard admin bootstrap uses the
prod/admin-passwordsecret only when theadminrow does not already exist; rotating the secret alone does not reset an already-seeded admin password hash - GitLab Runner deployment scaffolding is drafted in the pgpu worktree via
.gitlab-ci.ymlanddeployment/GITLAB_RUNNER_DEPLOYMENT.md:mainis intended to runvalidateplus dev image builds automatically, while dev deploy / prod promote / prod deploy stay manual - do not assume CI can infer the final deploy target from changed files alone; service builds can be narrowed automatically, but the actual deploy decision should stay explicit because shared modules, contracts, and env-only changes can affect multiple services
- one EC2 can host multiple GitLab runners, but that is still logical separation only; prod safety should come from tags, protected refs, and distinct job routing rather than assuming host-level isolation
What To Treat As Current
model-apiis the service most likely still in active rollout- Threat Stream rows with plain
context_analysisare not automatically re-scans; only user-driven/v1/reanalyzeor/v1/reanalyze/batchresults should present asRescanned - one private-compute subnet can be healthy while the other still times out to
huggingface.co; do not assume both AZ paths are equivalent just because one task is green schedulerhas already been redeployed with richer model-api timeout diagnostics; do not redeploy it again just to refresh model-api image changes unless scheduler-specific code changedmodel-apiimage-only redeploys should leave scheduler/app untouched and preferably clone the known-good live task definition when you need zero-drift recovery- if local
docker exec ... curl http://127.0.0.1:8001/v1/scantiming on the model-api host is close topgpu, treat scheduler ledger/poll/post-processing as the first bottleneck instead of model-api serving - scheduler throughput changes tied to
COMPLIANCE_ANALYSIS_JOB_CLAIM_LIMITrequire rerender + redeploy; changing the render script default alone does not update an already rendered task definition appDB issues after secret edits are separate from model-api serving issues- current model-api incidents split into three buckets:
- caller-to-ALB connectivity / security groups
- model-api / vLLM runtime or queue behavior
- vLLM context overflow clipping / retry behavior
- public app access now depends more on listener/TG correctness than on certificate attachment alone; if
HTTP:80works butHTTPS:443returns503, first confirm the443listener points to the same healthy TG ARN as the app tasks - ALB target groups with the same visible name can still be different resources; always verify the exact ARN before assuming
80and443share the same backend - the desired public ALB pattern is
HTTP:80redirecting toHTTPS:443, withHTTPS:443forwarding to the single healthy app TG - a private certificate still gives real TLS termination at the ALB, but browsers can still warn if users hit the raw
*.elb.amazonaws.comhostname or if the private CA is not trusted on the client - dashboard frontend uses same-origin
/v1/...API calls, so a public dashboard task also exposes the same host's app/API surface
Resume Checklist
- confirm you are working from
/home/kevin/projects/agent_parseronpgpu - confirm live
PRIMARYtask definition per service - confirm ECS container instances are registered after any ASG/LT recycle
- confirm model-api TG target health, listener
8001, and scheduler/appMODEL_API_URL(S)envs - confirm internal model-api ALB SG allows the live app/scheduler task SGs
- if app template or healthcheck changed, rerender
deployment/rendered/ecs-task-definition-app.prod.jsonand verify it contains/readyzbefore deploy - if one model-api task is healthy, use that container to derive the real EFS HF cache path before changing
--model - if
/v1/scan500s on long prompts, classify whether the task is on pre-b771369code before treating it as generic instability - check ECS service deployment configuration before assuming
force-new-deploymentpreserves one healthy task - only then decide whether caller redeploy is still needed
Do Not Re-load
- full migration history
- old
model-api/model-api-gpu1endpoint debugging unless logs still show them - generic Fargate migration guidance unless the failure bucket is unknown
- local snapshot patches under
/Users/1110847/Documents/AWS MIGRATION/agent_parser_patchas if they were the live repo