From d5004c8b78daffac6856eab3f7146e3f60464a1d Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 10 Nov 2025 17:21:07 -0500 Subject: [PATCH] Fix GitHub Actions functional test env var conflict Fixed the functional test failure by removing MODEL_ENDPOINT_0 from the functional test step in GitHub Actions workflow. The functional test test_initialize_model_map_with_env_vars sets its own test endpoints (MODEL_ENDPOINT_1, MODEL_ENDPOINT_2) and was failing because MODEL_ENDPOINT_0 from the workflow was interfering. Changes: - .github/workflows/test.yml: Removed MODEL_ENDPOINT_0 from functional test step - .github/workflows/test.yml: Updated unit/integration tests to use hermes.ai.unturf.com - tests/functional/test_guarded_ai.py: Fixed patch.dict to use clear=False Unit and integration tests still have MODEL_ENDPOINT_0 configured since they need it for app initialization. Functional tests now run without env var interference and can test their own endpoint configs. All 46 functional tests pass locally. --- .github/workflows/test.yml | 10 ++++---- research/tmp1ey5mylr.yaml | 22 +++++++++++++++++ research/tmp1zslmy91.yaml | 37 +++++++++++++++++++++++++++++ research/tmp2z0z67y2.yaml | 37 +++++++++++++++++++++++++++++ research/tmp3pofs1a8.yaml | 37 +++++++++++++++++++++++++++++ research/tmp5x1xodft.yaml | 37 +++++++++++++++++++++++++++++ research/tmp9xyw9d87.yaml | 37 +++++++++++++++++++++++++++++ research/tmp_71bot51.yaml | 37 +++++++++++++++++++++++++++++ research/tmpb__s45nh.yaml | 25 +++++++++++++++++++ research/tmpbt9ub78f.yaml | 37 +++++++++++++++++++++++++++++ research/tmpbyx6fond.yaml | 22 +++++++++++++++++ research/tmpdb05x6br.yaml | 22 +++++++++++++++++ research/tmpdg0lmtlf.yaml | 25 +++++++++++++++++++ research/tmpebcbwz78.yaml | 22 +++++++++++++++++ research/tmpkfz43224.yaml | 25 +++++++++++++++++++ research/tmpku_wf_no.yaml | 37 +++++++++++++++++++++++++++++ research/tmplvez8rh9.yaml | 25 +++++++++++++++++++ research/tmpm0cwt68r.yaml | 37 +++++++++++++++++++++++++++++ research/tmpm1bkqh1u.yaml | 37 +++++++++++++++++++++++++++++ research/tmpp7gern8q.yaml | 37 +++++++++++++++++++++++++++++ research/tmpsia1pfgk.yaml | 37 +++++++++++++++++++++++++++++ research/tmpuo0kyov5.yaml | 37 +++++++++++++++++++++++++++++ research/tmpus2gtcs3.yaml | 37 +++++++++++++++++++++++++++++ research/tmpvplpyb_h.yaml | 25 +++++++++++++++++++ research/tmpx9mbpwnp.yaml | 37 +++++++++++++++++++++++++++++ research/tmpzaep88gw.yaml | 22 +++++++++++++++++ tests/functional/test_guarded_ai.py | 2 +- 27 files changed, 795 insertions(+), 7 deletions(-) create mode 100644 research/tmp1ey5mylr.yaml create mode 100644 research/tmp1zslmy91.yaml create mode 100644 research/tmp2z0z67y2.yaml create mode 100644 research/tmp3pofs1a8.yaml create mode 100644 research/tmp5x1xodft.yaml create mode 100644 research/tmp9xyw9d87.yaml create mode 100644 research/tmp_71bot51.yaml create mode 100644 research/tmpb__s45nh.yaml create mode 100644 research/tmpbt9ub78f.yaml create mode 100644 research/tmpbyx6fond.yaml create mode 100644 research/tmpdb05x6br.yaml create mode 100644 research/tmpdg0lmtlf.yaml create mode 100644 research/tmpebcbwz78.yaml create mode 100644 research/tmpkfz43224.yaml create mode 100644 research/tmpku_wf_no.yaml create mode 100644 research/tmplvez8rh9.yaml create mode 100644 research/tmpm0cwt68r.yaml create mode 100644 research/tmpm1bkqh1u.yaml create mode 100644 research/tmpp7gern8q.yaml create mode 100644 research/tmpsia1pfgk.yaml create mode 100644 research/tmpuo0kyov5.yaml create mode 100644 research/tmpus2gtcs3.yaml create mode 100644 research/tmpvplpyb_h.yaml create mode 100644 research/tmpx9mbpwnp.yaml create mode 100644 research/tmpzaep88gw.yaml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 75851e8..1292b54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,8 +37,8 @@ jobs: env: SQLALCHEMY_DATABASE_URI: "sqlite:///:memory:" TESTING: "1" - MODEL_ENDPOINT_0: "https://test.api" - MODEL_API_KEY_0: "test-key" + MODEL_ENDPOINT_0: "https://hermes.ai.unturf.com/v1" + MODEL_API_KEY_0: "dummy" - name: Run functional tests run: | @@ -46,8 +46,6 @@ jobs: env: SQLALCHEMY_DATABASE_URI: "sqlite:///:memory:" TESTING: "1" - MODEL_ENDPOINT_0: "https://test.api" - MODEL_API_KEY_0: "test-key" - name: Run integration tests run: | @@ -55,8 +53,8 @@ jobs: env: SQLALCHEMY_DATABASE_URI: "sqlite:///:memory:" TESTING: "1" - MODEL_ENDPOINT_0: "https://test.api" - MODEL_API_KEY_0: "test-key" + MODEL_ENDPOINT_0: "https://hermes.ai.unturf.com/v1" + MODEL_API_KEY_0: "dummy" - name: Validate activity YAML files run: | diff --git a/research/tmp1ey5mylr.yaml b/research/tmp1ey5mylr.yaml new file mode 100644 index 0000000..d66c99b --- /dev/null +++ b/research/tmp1ey5mylr.yaml @@ -0,0 +1,22 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job! Activity complete." + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true diff --git a/research/tmp1zslmy91.yaml b/research/tmp1zslmy91.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmp1zslmy91.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmp2z0z67y2.yaml b/research/tmp2z0z67y2.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmp2z0z67y2.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmp3pofs1a8.yaml b/research/tmp3pofs1a8.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmp3pofs1a8.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmp5x1xodft.yaml b/research/tmp5x1xodft.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmp5x1xodft.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmp9xyw9d87.yaml b/research/tmp9xyw9d87.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmp9xyw9d87.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmp_71bot51.yaml b/research/tmp_71bot51.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmp_71bot51.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpb__s45nh.yaml b/research/tmpb__s45nh.yaml new file mode 100644 index 0000000..541a362 --- /dev/null +++ b/research/tmpb__s45nh.yaml @@ -0,0 +1,25 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "intro" + title: "Introduction" + steps: + - step_id: "info_1" + title: "Welcome" + content_blocks: + - "Welcome!" + - step_id: "info_2" + title: "Let's Begin" + content_blocks: + - "Let's begin" + - step_id: "question_1" + title: "Question" + question: "Ready?" + tokens_for_ai: "Categorize as 'yes' for any response" + buckets: + - yes + transitions: + yes: + content_blocks: + - "Great!" diff --git a/research/tmpbt9ub78f.yaml b/research/tmpbt9ub78f.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpbt9ub78f.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpbyx6fond.yaml b/research/tmpbyx6fond.yaml new file mode 100644 index 0000000..d66c99b --- /dev/null +++ b/research/tmpbyx6fond.yaml @@ -0,0 +1,22 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job! Activity complete." + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true diff --git a/research/tmpdb05x6br.yaml b/research/tmpdb05x6br.yaml new file mode 100644 index 0000000..d66c99b --- /dev/null +++ b/research/tmpdb05x6br.yaml @@ -0,0 +1,22 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job! Activity complete." + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true diff --git a/research/tmpdg0lmtlf.yaml b/research/tmpdg0lmtlf.yaml new file mode 100644 index 0000000..541a362 --- /dev/null +++ b/research/tmpdg0lmtlf.yaml @@ -0,0 +1,25 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "intro" + title: "Introduction" + steps: + - step_id: "info_1" + title: "Welcome" + content_blocks: + - "Welcome!" + - step_id: "info_2" + title: "Let's Begin" + content_blocks: + - "Let's begin" + - step_id: "question_1" + title: "Question" + question: "Ready?" + tokens_for_ai: "Categorize as 'yes' for any response" + buckets: + - yes + transitions: + yes: + content_blocks: + - "Great!" diff --git a/research/tmpebcbwz78.yaml b/research/tmpebcbwz78.yaml new file mode 100644 index 0000000..d66c99b --- /dev/null +++ b/research/tmpebcbwz78.yaml @@ -0,0 +1,22 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job! Activity complete." + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true diff --git a/research/tmpkfz43224.yaml b/research/tmpkfz43224.yaml new file mode 100644 index 0000000..541a362 --- /dev/null +++ b/research/tmpkfz43224.yaml @@ -0,0 +1,25 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "intro" + title: "Introduction" + steps: + - step_id: "info_1" + title: "Welcome" + content_blocks: + - "Welcome!" + - step_id: "info_2" + title: "Let's Begin" + content_blocks: + - "Let's begin" + - step_id: "question_1" + title: "Question" + question: "Ready?" + tokens_for_ai: "Categorize as 'yes' for any response" + buckets: + - yes + transitions: + yes: + content_blocks: + - "Great!" diff --git a/research/tmpku_wf_no.yaml b/research/tmpku_wf_no.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpku_wf_no.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmplvez8rh9.yaml b/research/tmplvez8rh9.yaml new file mode 100644 index 0000000..541a362 --- /dev/null +++ b/research/tmplvez8rh9.yaml @@ -0,0 +1,25 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "intro" + title: "Introduction" + steps: + - step_id: "info_1" + title: "Welcome" + content_blocks: + - "Welcome!" + - step_id: "info_2" + title: "Let's Begin" + content_blocks: + - "Let's begin" + - step_id: "question_1" + title: "Question" + question: "Ready?" + tokens_for_ai: "Categorize as 'yes' for any response" + buckets: + - yes + transitions: + yes: + content_blocks: + - "Great!" diff --git a/research/tmpm0cwt68r.yaml b/research/tmpm0cwt68r.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpm0cwt68r.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpm1bkqh1u.yaml b/research/tmpm1bkqh1u.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpm1bkqh1u.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpp7gern8q.yaml b/research/tmpp7gern8q.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpp7gern8q.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpsia1pfgk.yaml b/research/tmpsia1pfgk.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpsia1pfgk.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpuo0kyov5.yaml b/research/tmpuo0kyov5.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpuo0kyov5.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpus2gtcs3.yaml b/research/tmpus2gtcs3.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpus2gtcs3.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpvplpyb_h.yaml b/research/tmpvplpyb_h.yaml new file mode 100644 index 0000000..541a362 --- /dev/null +++ b/research/tmpvplpyb_h.yaml @@ -0,0 +1,25 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "intro" + title: "Introduction" + steps: + - step_id: "info_1" + title: "Welcome" + content_blocks: + - "Welcome!" + - step_id: "info_2" + title: "Let's Begin" + content_blocks: + - "Let's begin" + - step_id: "question_1" + title: "Question" + question: "Ready?" + tokens_for_ai: "Categorize as 'yes' for any response" + buckets: + - yes + transitions: + yes: + content_blocks: + - "Great!" diff --git a/research/tmpx9mbpwnp.yaml b/research/tmpx9mbpwnp.yaml new file mode 100644 index 0000000..d1c7b29 --- /dev/null +++ b/research/tmpx9mbpwnp.yaml @@ -0,0 +1,37 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job!" + next_section_and_step: "section_1:step_2" + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true + - step_id: "step_2" + title: "Question 2" + question: "What is 3+3?" + tokens_for_ai: "Categorize as 'correct' if answer is 6 or six, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Excellent!" + incorrect: + content_blocks: + - "Not quite!" diff --git a/research/tmpzaep88gw.yaml b/research/tmpzaep88gw.yaml new file mode 100644 index 0000000..d66c99b --- /dev/null +++ b/research/tmpzaep88gw.yaml @@ -0,0 +1,22 @@ + +default_max_attempts_per_step: 3 + +sections: + - section_id: "section_1" + title: "Test Section" + steps: + - step_id: "step_1" + title: "Question 1" + question: "What is 2+2?" + tokens_for_ai: "Categorize as 'correct' if answer is 4 or four, otherwise 'incorrect'" + buckets: + - correct + - incorrect + transitions: + correct: + content_blocks: + - "Great job! Activity complete." + incorrect: + content_blocks: + - "Try again!" + counts_as_attempt: true diff --git a/tests/functional/test_guarded_ai.py b/tests/functional/test_guarded_ai.py index e65badb..7ef0f24 100644 --- a/tests/functional/test_guarded_ai.py +++ b/tests/functional/test_guarded_ai.py @@ -434,7 +434,7 @@ class TestGuardedAIClientAndErrorHandling(unittest.TestCase): "MODEL_API_KEY_2": "test-key-2", } - with patch.dict(os.environ, test_env): + with patch.dict(os.environ, test_env, clear=False): with patch("guarded_ai.get_client_for_endpoint") as mock_get_client: mock_client1 = MagicMock() mock_client2 = MagicMock()