Skip to content

Audit/readme and fixes - #1

Merged
aaminashihab merged 11 commits into
mainfrom
audit/readme-and-fixes
Nov 6, 2026
Merged

aaminashihab merged 11 commits into
mainfrom
audit/readme-and-fixes

Conversation

@aaminashihab

Copy link
Copy Markdown
Owner

No description provided.

aaminashihab and others added 11 commits November 6, 2026 12:40
GET /api/actions/{id}/why-acted referenced StateTransitionResult without
importing it, so every request for an existing action returned 500
(NameError). Adds a regression test that runs a real tick and explains
the resulting action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AgentGateway took _cap_lock with acquire() and released it by hand. If
the daily-total check (or recording the decision) raised, for example on
a database error, the lock stayed held and every later auto-allowed
proposal blocked forever. Use a `with` block instead. Adds a test that
makes the check fail once and asserts the next proposal still completes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GOOGLE_CLOUD_PROJECT defaulted to a real-looking project ID, which
Model Armor would call and /healthz and /api/agbom would expose. The
production guard compared against a different string
("approval-loop-hackathon"), so it never fired.

- Default the setting to empty and refuse production start-up without it.
- Skip Model Armor (pattern filter only) when no project is set, instead
  of building a template path with an empty project.
- Clear the stale default in AgBOM and the project ID in a test fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Escalations of 5,000 or more were only allowed to recipients whose
address contained "director", "admin" or "vp". When a report has no
backup approver the loop escalates to ADMIN_FALLBACK_EMAIL, whose
default (escalations-owner@company.internal) matches none of them, so
those reports were blocked on every tick and never escalated. Accept
the configured fallback address explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Production refuses the built-in AGENT_IDENTITY_SECRET, but deploy.sh
never set it (neither as an env var nor from Secret Manager), so every
APP_ENV=production deploy failed at start-up. Pass it through both
paths (secret "agent-identity-secret"), and fail early in production
when the development SCHEDULER_API_KEY or no identity secret is used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GitHub rejects `secrets.*` in step `if:` conditions, so every run of
  deploy.yml failed before doing anything. Expose "GCP_SA_KEY is set"
  as a workflow env value and test that instead (actionlint-clean).
- Require GCP_PROJECT_ID instead of falling back to a hard-coded name.
- In production: require Cloud SQL, read GEMINI_API_KEY,
  SCHEDULER_API_KEY and AGENT_IDENTITY_SECRET from Secret Manager, and
  deploy with --no-allow-unauthenticated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- fleet.py: guardrail flags on agent input/output were logged as
  "rejected", but output flags are only logged and the proposal goes on
  to the gateway (which screens it again). Say so. Drop an unreachable
  duplicate `return` in FinanceAgent.propose_refund.
- gateway.py: the flow docstring listed a "Deterministic Parameter
  Check" step and async execution; neither exists.
- auth_provider.py: allowed_tools is not enforced; the replay cache
  comment said "per-process only" though the shared repository is used.
- tracer.py: no OpenTelemetry exporter is configured and the current
  trace is process-wide; describe it as an in-memory buffer.

No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paper/eval/run_evaluation.py (and the figure scripts) import matplotlib,
which no requirements file listed, so the "reproducible" harness failed
on a fresh environment. Add paper/requirements.txt (backend requirements
plus matplotlib) and mention it in the harness docstring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked every README claim against the code, test runs and the paper's
evaluation harness, and fixed what did not match:

- Project layout: add domain/, validator/, observability/, skills/,
  config.py and DEVPOST.md; docs/ no longer has the study guide.
- Configuration: CORS origins only apply in production;
  GOOGLE_CLOUD_PROJECT is required in production; complete list of
  production start-up checks; .env loading.
- API: add /healthz, POST /registry/agents, GET /registry/agents/{id}
  and GET /memory/workflows/{id}.
- Clarify Model Armor (needs a project and credentials; FAIL_CLOSED only
  covers API errors), approval expiry, skill files, tracing, reminder
  timings per APP_ENV, Python versions.
- Tests: 216; evaluation needs paper/requirements.txt.
- Deploy: describe what deploy.sh and deploy.yml actually do now.
- Known limitations: per-process cap lock (total is shared), escalation
  rule for large reports, Sandbox reset behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seven PNGs in docs/screenshots/ captured with Playwright (headless Edge)
from a local demo-mode server using only the built-in sample data: the
operator-key prompt, the approval queue, an approval result, a blocked
refund in the Sandbox, and the Activity, Agents and Expenses views. The
operator key was set in session storage and never rendered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It still describes Firestore storage and 128 tests; the code uses
PostgreSQL and has 216 tests. Add a note at the top pointing to the
README rather than rewriting the archived text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aaminashihab
aaminashihab merged commit dfc72bd into main Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant