Skip to content

[Docs] Add a document outlining the core code properties of the code here.#183

Open
morrowc wants to merge 5 commits into
masterfrom
mondernize
Open

[Docs] Add a document outlining the core code properties of the code here.#183
morrowc wants to merge 5 commits into
masterfrom
mondernize

Conversation

@morrowc

@morrowc morrowc commented May 29, 2026

Copy link
Copy Markdown
Collaborator

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.

Chris Morrow added 5 commits May 28, 2026 23:41
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.
@morrowc morrowc requested review from massar and vixie June 3, 2026 13:16
@morrowc

morrowc commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Added vixie for review.

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.

1 participant