Skip to content

fix(headers): MutableHeaders.pop() compatibility + dev environment setup#19

Draft
Bobcatsfan33 wants to merge 1 commit into
mainfrom
cursor/dev-environment-setup-2054
Draft

fix(headers): MutableHeaders.pop() compatibility + dev environment setup#19
Bobcatsfan33 wants to merge 1 commit into
mainfrom
cursor/dev-environment-setup-2054

Conversation

@Bobcatsfan33

Copy link
Copy Markdown
Owner

Summary

  • Fix MutableHeaders.pop() call in modules/security/headers.py that fails across all starlette versions (starlette's MutableHeaders has never exposed a pop() method). Replaced with a guard + del pattern.
  • Add AGENTS.md with Cursor Cloud specific development instructions covering required services, environment caveats, and key commands.

Type of Change

  • Bug fix
  • Documentation

Security Review Checklist

  • No secrets, credentials, or API keys introduced
  • No weakening of existing authentication or authorization controls
  • No new external network calls without approval
  • Input validation applied to all new user-controlled values
  • Error messages do not leak internal system details
  • If touching auth, crypto, or remediation — I have documented why this is safe

Testing

Verified environment is fully functional:

  • ruff check . — all checks passed
  • pytest tests/ -v — 155/155 tests passed
  • DEV_MODE=true uvicorn api:app --reload — app starts successfully
  • curl http://localhost:8000/ — health check returns {"service": "TokenDNA", "redis": true, "dev_mode": true}
  • curl http://localhost:8000/secure — token integrity check works with synthetic dev-user

dev_environment_test_output.log

Related Issues

N/A — discovered during development environment setup.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

…tern

The starlette MutableHeaders class does not have a pop() method.
Replace with a guard + del pattern that works across all starlette versions.

Also add AGENTS.md with Cursor Cloud specific development instructions.

Co-authored-by: Bobcatsfan33 <Bobcatsfan33@users.noreply.github.com>
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.

2 participants