Compare commits

...
Sign in to create a new pull request.

12 commits

Author SHA1 Message Date
7acf59c320 fix(ci): correct container image expression
Some checks failed
CI / PHP 8.3 (push) Failing after 1s
CI / PHP 8.4 (push) Failing after 1s
2026-02-23 13:47:09 +00:00
686deac9b0 feat(ci): use lthn/build:php container image
Some checks failed
CI / PHP 8.3 (push) Failing after 0s
CI / PHP 8.4 (push) Failing after 0s
Replace setup-php action with pre-built container.
Eliminates ~50s setup overhead per matrix job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:46:48 +00:00
Claude
2c766f24af ci: retrigger workflow
All checks were successful
CI / PHP 8.3 (push) Successful in 1m0s
CI / PHP 8.4 (push) Successful in 54s
2026-02-23 05:48:43 +00:00
Claude
17eae413ec ci: add composer config for path repositories (v5)
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
2026-02-23 05:45:51 +00:00
Claude
7e962540be
fix(ci): hard-code sister package clone instead of PHP parsing
Some checks failed
CI / PHP 8.3 (push) Failing after 46s
CI / PHP 8.4 (push) Failing after 46s
Direct git clone of ../php-framework avoids shell escaping
issues with dynamic PHP-based path extraction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:31:44 +00:00
Claude
4a048c184e
fix(ci): use single-quoted PHP to avoid shell escaping issues
Some checks failed
CI / PHP 8.3 (push) Failing after 43s
CI / PHP 8.4 (push) Failing after 46s
Switch php -r argument to single quotes so PHP dollar signs
are not interpreted by bash. Pipe output to while-read loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:24:26 +00:00
Claude
0d1d4efa94
fix(ci): correct bash escaping in dependency checkout step
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
The PHP variables inside php -r need \$ escaping, but shell
variables outside need bare $ for command substitution and
variable expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:19:17 +00:00
Claude
457fecf096
ci: inline workflow to bypass reusable workflow cache
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
The Forgejo act runner caches reusable workflow definitions,
preventing updates from being picked up. Inline the workflow
with dependency checkout step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:11:48 +00:00
Claude
f75d69444e
ci: use reusable PHP test workflow from core/php
Some checks failed
CI / tests (push) Failing after 1m9s
Co-Authored-By: Charon <charon@lethean.io>
2026-02-23 01:22:19 +00:00
bcbadf3830 Merge pull request 'chore: discovery scan — 31 improvement issues created (closes #2)' (#35) from chore/issue-2-discovery-scan into main
Some checks failed
CI / PHP 8.3 (push) Failing after 1s
CI / PHP 8.2 (push) Failing after 1s
CI / PHP 8.4 (push) Failing after 1s
CI / Assets (push) Failing after 1s
2026-02-21 01:22:47 +00:00
ef1debf7a9 Merge pull request 'docs(phase-0): environment assessment, findings and phased TODO' (#3) from feat/phase-0-assessment into main
Some checks are pending
CI / PHP 8.2 (push) Waiting to run
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
CI / Assets (push) Waiting to run
2026-02-21 01:22:30 +00:00
darbs-claude
217e9bbfb6 chore: record discovery scan results for issue #2
Some checks failed
CI / PHP 8.2 (pull_request) Failing after 1s
CI / PHP 8.3 (pull_request) Failing after 1s
CI / Assets (pull_request) Failing after 1s
CI / PHP 8.4 (pull_request) Failing after 1s
Automated scan of the php-mcp codebase identified 30 issues across:
- 12 missing test coverage gaps (services, tools)
- 4 refactoring opportunities (SQL parser, ToolResult DTO, PHPStan, Boot.php)
- 4 infrastructure chores (missing YAML configs, PHPStan setup, CI, streaming)
- 6 feature gaps (templates, schema tools, export, caching, history, validation)
- 3 security reviews required (suspicious query monitoring, ContentTools, commerce)
- 1 documentation gap

All issues created on forge.lthn.ai (issues #4–#34).
Roadmap summary at #34

Closes #2

Co-Authored-By: darbs-claude <developers@lethean.io>
2026-02-21 01:04:19 +00:00
2 changed files with 109 additions and 0 deletions

57
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,57 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
container:
image: lthn/build:php-${{ matrix.php }}
strategy:
fail-fast: true
matrix:
php: ["8.3", "8.4"]
steps:
- uses: actions/checkout@v4
- name: Clone sister packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Cloning php-framework into ../php-framework"
git clone --depth 1 \
"https://x-access-token:${GITHUB_TOKEN}@forge.lthn.ai/core/php-framework.git" \
../php-framework
ls -la ../php-framework/composer.json
- name: Configure path repositories
run: |
composer config repositories.core path ../php-framework --no-interaction
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run Pint
run: |
if [ -f vendor/bin/pint ]; then
vendor/bin/pint --test
else
echo "Pint not installed, skipping"
fi
- name: Run tests
run: |
if [ -f vendor/bin/pest ]; then
vendor/bin/pest --ci --coverage
elif [ -f vendor/bin/phpunit ]; then
vendor/bin/phpunit --coverage-text
else
echo "No test runner found, skipping"
fi

View file

@ -0,0 +1,52 @@
# Discovery Scan — 2026-02-21
Automated discovery scan performed for issue #2.
## Issues Created
### Test Coverage (12 issues)
- #4 — test: add tests for ToolRegistry service
- #5 — test: add tests for AuditLogService
- #6 — test: add tests for CircuitBreaker service
- #7 — test: add tests for DataRedactor service
- #8 — test: add tests for McpHealthService
- #9 — test: add tests for McpMetricsService
- #10 — test: add tests for McpWebhookDispatcher
- #11 — test: add tests for OpenApiGenerator
- #12 — test: add tests for ToolRateLimiter
- #13 — test: add tests for AgentSessionService
- #14 — test: add tests for AgentToolRegistry
- #15 — test: add integration tests for QueryDatabase tool
### Refactoring (4 issues)
- #16 — refactor: extract SQL parser from regex to AST-based validation
- #17 — refactor: standardise tool responses with ToolResult DTO
- #18 — refactor: fix PHPStan level 5 type errors across services
- #19 — refactor: extract McpToolsRegistering tool registration from McpAgentServerCommand
### Infrastructure / Chores (4 issues)
- #20 — chore: create missing ToolRegistry YAML server definition files
- #21 — chore: add PHPStan and static analysis to dev dependencies
- #22 — chore: add CI/CD security regression tests
- #31 — chore: add query result streaming for large result sets
### Features (6 issues)
- #23 — feat: add query template system
- #24 — feat: add schema exploration tools (ListTables, DescribeTable, ListIndexes)
- #25 — feat: add data export tool (CSV, JSON)
- #26 — feat: add query result caching
- #32 — feat: add query history tracking per workspace
- #33 — feat: add data validation tool for database quality checks
### Security (3 issues)
- #27 — security: add monitoring and alerting for suspicious query patterns
- #28 — security: review ContentTools for injection and data exposure risks
- #29 — security: review commerce tools for payment data exposure
### Documentation (1 issue)
- #30 — docs: add inline documentation for ContentTools and commerce tools
### Roadmap (1 issue)
- #34 — roadmap: php-mcp production readiness
**Total: 31 issues created**