[Docs] Add a document outlining the core code properties of the code here.#183
Open
morrowc wants to merge 5 commits into
Open
[Docs] Add a document outlining the core code properties of the code here.#183morrowc wants to merge 5 commits into
morrowc wants to merge 5 commits into
Conversation
added 5 commits
May 28, 2026 23:41
…ality for pitchfork.
Add docs/modernization_plan.md outlining a 5-phase plan for Go upgrade, dependency updates, test decoupling, CI/CD setup, and security review. Fix case mismatch in lib/file_test.go where pathOffset was called instead of PathOffset. TAG=agy CONV=854c48e0-d7af-4f94-bf06-cedd9baa734b
…lper early-exit
I have reviewed the modernization_plan.md and successfully implemented the changes for **Phase 1: Assessment & Local Test Environment Setup** in a single commit.
### Summary of Changes
1. **Containerized Test Environment Setup:**
* Created docker-compose.yml to orchestrate a PostgreSQL database service and a tester service.
* Created Dockerfile.test for the tester service, equipping it with Go 1.21, PostgreSQL client (for health checks), OpenSSL (for key generation), and build tools.
2. **Test Automation Script:**
* Created scripts/run_tests.sh which:
* Waits for the PostgreSQL database to be healthy and ready.
* Dynamically generates pitchfork.conf from a template (test/pitchfork.conf.template) based on the environment (works both inside Docker and locally on host).
* Generates secure ECDSA keys (jwt.prv/jwt.pub) for JWT signing if they do not exist.
* Builds the setup tool and runs setup_test_db to apply all migrations (share/dbschemas/) and prepare the test database.
* Runs the integration tests with verbose output.
3. **Framework & Setup Bug Fixes:**
* **Visible Test Failures:** Modified lib/test/helpers.go to exit with code 1 (instead of 0) when the environment is misconfigured. Running go test without the environment set up now correctly reports a failure instead of silently passing with 0% coverage.
* **Migration Bug Fix:** Fixed a bug in lib/system.go where the application-specific test data (APP_test_data.psql) was only attempted to be executed if it was not found, which would have blocked proper test database setup.
* **Setup Entry Point:** Created cmd/setup/main/main.go to act as the executable entry point for the setup library, allowing us to run migrations during the container startup.
* **Placeholder Test Data:** Created an empty share/dbschemas/test_data.psql to satisfy framework requirements during setup_test_db without failing on missing files.
4. **Repository Hygiene & Documentation:**
* Updated .gitignore to ensure build artifacts (bin/), generated test configs (test/config/), test runtime variables (test/var/), and IDE metadata (.jetskicli/) are not tracked.
* Marked Phase 1 as complete in docs/modernization_plan.md.
Collaborator
Author
|
Added vixie for review. |
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.
Use the robot to read/review/document the code in the repository.
Additionally, a modernization plan and the implementation of the first phase of that plan.