Conversation
Streamlined test execution by: - Mocking `GetPassageHTML` in `pkg/app/passage_test.go` and `pkg/app/devo_test.go` to prevent external network calls to BibleGateway during unit tests. - Updating `pkg/app/api_client_test.go` to conditionally run integration tests against the real Bible AI API only if `BIBLE_API_URL` is explicitly set and not equal to "https://example.com". Otherwise, it defaults to a safe mock environment. - Adding a `Fallback: Scrape` test case in `passage_test.go` to verify the fallback logic without triggering actual network requests. These changes ensure that standard "MR tests" are fast and isolated, while still allowing a "comprehensive eval" against the real API via environment configuration.
- Created `docs/TESTING.md` to outline the hybrid testing strategy (standard mocks vs. conditional live integration). - Refactored `pkg/app/passage_test.go` and `pkg/app/devo_test.go` to mock `GetPassageHTML`, preventing external scraping during unit tests. - Updated `pkg/app/api_client_test.go` to support conditional live API testing when `BIBLE_API_URL` is configured. - Cleaned up test logic to ensure proper isolation of global variable mocks.
- Updated `scripts/tasks.py`, `scripts/memory.py`, and `scripts/bootstrap.py` to match `julwrites/agent-harness`. - Updated `templates/GUIDE.md` and `templates/maintenance_mode.md`. - Updated `docs/tasks/GUIDE.md` and `.cursorrules`. - Verified `AGENTS.md` integrity and tool definitions. - Ensured `CLAUDE.md` is aligned via bootstrap script.
…2360681302 Update Agent Harness
- Updated `scripts/tasks.py`, `scripts/memory.py`, `scripts/bootstrap.py` - Updated `scripts/tasks` wrapper - Updated `AGENTS.md` and `CLAUDE.md` - Updated `templates/task.md` and `templates/maintenance_mode.md` - Removed invalid templates (`epic.md`, `sprint.md`) - Preserved project-specific instructions in `AGENTS.md`
…7671191594 Update Agent Harness
Updated `ScriptureBot` to perform server-side HTML preprocessing for Telegram messages. - Replaced `FilterTree` logic in `pkg/app/passage.go` with a recursive `ParseNodesForPassage` function that walks the entire HTML tree. - Implemented robust HTML tag conversion: - `<h1>`-`<h6>` -> `<b>` (bold with newlines) - `<ul>`/`<li>` -> Bullet points (`•`) - `div` -> Recurse children (stripping tag) - `b`/`strong` -> `<b>` - `i`/`em` -> `<i>` - `sup` -> Unicode superscripts (via `platform.TelegramSuperscript`) - Added explicit HTML escaping for all text content to prevent injection or broken tags. - Configured `env.Res.ParseMode = "HTML"` for `GetBiblePassage` responses. - Updated unit tests in `pkg/app/passage_test.go` to verify new HTML output formats and correct handling of lists, headers, and superscripts.
…38505798009705932 Refactor passage HTML parsing for Telegram compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.