Skip to content

agent-friendly #5: ban datetime.utcnow (ruff DTZ) - #14

Merged
patote85 merged 2 commits into
mainfrom
agent-friendly/5-ban-footguns
Sep 24, 2026
Merged

patote85 merged 2 commits into
mainfrom
agent-friendly/5-ban-footguns

Conversation

@patote85

Copy link
Copy Markdown
Owner

agent-friendly #5 — ban footguns (datetime.utcnow)

Changes

  • Enable ruff DTZ (flake8-datetimez) in pyproject.toml (select E/F/W/DTZ)
  • Replace datetime.utcnow() with datetime.now(timezone.utc) in lambda/app.py and lambda/domain_dynamo.py
  • Scan: no other utcnow/utcfromtimestamp in lambda/ + cdk/
  • README incremental: Agent-friendly / hard constraints (DTZ + no CORS * in CDK — already localhost-only)

Why

Encode footgun ban in structure (ruff fails CI on naive utcnow). CORS * is a CRUD/SAM issue; canônico CDK already avoids it.

Verify

make check / CI lint+test+synth. CAB waived by Rodrigo for #5–#7.

- Enable ruff flake8-datetimez (DTZ) in pyproject
- Replace utcnow with datetime.now(timezone.utc) in lambda/
- README: hard constraints note (DTZ + no CORS *)
@patote85
patote85 merged commit 193bba0 into main Sep 24, 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