Skip to content

Local runs without a secrets.toml crash on st.secrets access (feedback widget) - #72

Merged
mrwadams merged 3 commits into
mainfrom
agent/issue-70
Aug 11, 2026
Merged

Local runs without a secrets.toml crash on st.secrets access (feedback widget)#72
mrwadams merged 3 commits into
mainfrom
agent/issue-70

Conversation

@mrwadams

@mrwadams mrwadams commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Automated by agent-loop — pi worked this issue on a fresh clone of mrwadams/attackgen; changes were gated outside the agent on agent-1.

Closes #70

How to test

git fetch origin && git checkout agent/issue-70
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
streamlit run "00_👋_Welcome.py"

Then open the printed local URL.

Confirm each acceptance criterion:

  • With no secrets.toml present anywhere, Welcome and every scenario page render without a StreamlitSecretNotFoundError
  • When LANGCHAIN_API_KEY is absent, the feedback widget still renders and no LangSmith call is attempted
  • When LANGCHAIN_API_KEY is present in secrets, existing LangSmith feedback behaviour is unchanged
  • Every st.secrets access in core/feedback.py is guarded (three access sites today)
  • A regression test exercises the no-secrets-file path — i.e. secret resolution raising StreamlitSecretNotFoundError, not merely a mocked "key absent" membership (the existing tests/test_scenario_page.py mock hides this failure mode)

Gates (non-authoritative)

  • files_non_empty — 3 non-empty file(s) changed
  • containment — diff stays within the allowed lane
  • verify — pytest: 243 passed, no failures (browser/e2e excluded)

Draft. Browser/e2e tests were NOT run in-gate — run them and review before merging. Nothing here is auto-merged.

Comment thread tests/test_feedback.py Dismissed
Comment thread tests/test_feedback.py Fixed
mrwadams and others added 2 commits August 8, 2026 10:33
CodeQL flagged the `st.empty` stub as a lambda wrapping a callable
(code-scanning alert 236). `info_messages.append` and `object` can be
passed directly; behaviour is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts:
#	tests/test_scenario_page.py
@mrwadams
mrwadams marked this pull request as ready for review August 11, 2026 06:53
@mrwadams
mrwadams merged commit b7e5fdf into main Aug 11, 2026
13 checks passed
@mrwadams
mrwadams deleted the agent/issue-70 branch August 11, 2026 07:14
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.

Local runs without a secrets.toml crash on st.secrets access (feedback widget)

3 participants