Repository navigation
chore: absorb system into packages/system - #13804
Conversation
Introduce system library
Update composer description
feat(system): add method to check for specific architecture
fix enum class properties to be non abstract
feat(system): get enum of arch
Both branches previously fell through to 0.0 when shell_exec was disabled or returned no numeric output, breaking the >0 contract that the Linux branch and tests rely on. Throw a descriptive exception instead, matching the Linux behaviour. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
shell_exec can return string|false|null; use is_string() before passing to preg_match to satisfy static analysis. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
wmic emits one NumberOfCores row per socket, so preg_match captured only the first and undercounted multi-socket systems. Use preg_match_all and sum the values. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
An input like "3-1" previously produced a negative increment; require start <= end before counting. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: add getCPU() with cgroup limit support
The five per-arch test suites (only runnable on matching hardware, previously selected by CI inside docker) collapse into a single arch consistency test. Memory tests now expect success on Darwin, where getMemoryTotal/getMemoryFree are implemented; testGetMemoryAvailable was asserting against the wrong method in its else branch. TESTA/TESTB env vars move from the deleted Dockerfile into phpunit.xml. Co-Authored-By: Claude Fable 5 <[email protected]>
Every uses: ref is upgraded to its latest major (checkout v6, create-github-app-token v3) and pinned to the tag's commit SHA in ratchet's format. The validate job now runs ratchet lint over root and package workflows, so unpinned refs fail CI. Four leftover QA-only codeql workflows (cli, pools, telemetry, validators) are deleted — they invoke the composer check script that QA hoisting removed. Co-Authored-By: Claude Fable 5 <[email protected]>
- Drop the 17 per-package mirror CI workflows: they were inert in the monorepo and only re-tested, on the mirror, code the monorepo's own matrix already gated pre-merge. absorb now strips all incoming workflows and writes only mirror.yml; the ratchet lint over packages/* (no uses: left to pin) goes too. - Make absorb's mirror ruleset idempotent: update whatever branch ruleset already exists in place instead of skipping on a name clash (the gap that left auth's mirror without the split-app bypass). - Remove the standalone `import` command — unused, and it left a package without mirror.yml/banner/ruleset. import_package() stays as absorb's helper. - Trim absorbing.md/creating.md/README to match. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Hoist PHPStan level 5 to the monorepo root
build: hoist baseline rector + phpstan configs to the root
Reuse mirror redirect workflow
docs: enforce documentation style with Vale
docs: centralize CODE_OF_CONDUCT and CONTRIBUTING at the monorepo root
chore: stop committing package lock files
feat(system): add cgroup-aware memory capacity method
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
|
Investigated the four CI failures. Locale, Mqtt, and Organization have GitHub annotations saying the self-hosted runner lost communication with the server; their logs were not uploaded. Functions completed 83 tests with one failure: testFunctionsDomain expected 200 but received 404 at FunctionsCustomServerTest.php:2868. Build, root unit suite, static checks, and every package job (including system) passed. Retrying only the failed jobs on the unchanged commit to distinguish infrastructure/transient domain readiness from a reproducible regression. |
|
Retry completed successfully: https://github.com/appwrite/appwrite/actions/runs/35603648310/attempts/2. All four failed jobs now pass on the identical b8ab7b8 commit, and the full CI run is green. Locale/Mqtt/Organization were confirmed runner disconnects; the Functions domain 404 did not reproduce. No code change was needed. |
Summary
Move
utopia-php/systemintopackages/systemso Appwrite loads it directly and system-library changes can land with their callers. Import full mirror history atf7077643de7e012945f6e3fc4c3c36e7f1d40047, identical to the0.11.0release already in Appwrite’s lockfile.Flatten source and tests, register root autoload/replace entries, remove the Composer dependency, and point the mirror workflow and README at Appwrite. The lockfile removes only system; other dependencies retain their versions. Production code changes are formatting only. The environment-variable test now seeds its own isolated process rather than relying on the package XML, so it also runs in the combined Appwrite suite.
Per the migration RFC, record 16 existing maximum-level PHPStan findings in a baseline and the RFC follow-up list. Integration changes after the history import remove a net 18 lines.
Validation
bin/monorepo validatebin/monorepo check system: Pint and maximum-level PHPStan with baselinebin/monorepo test system: 33 tests, 65 assertions on PHP 8.5/macOSvendor/bin/phpunit --no-configuration --bootstrap vendor/autoload.php packages/system/tests: 33 tests, 65 assertions, including isolated cgroup fixturescomposer validate --no-check-publish: existing exact-version warnings onlybin/monorepo split system --dry-run:d1682f6e286b564de1b00364eee79a458095f20agit diff --checkLinux and full Appwrite integration validation remain for CI; no Appwrite stack was run locally.
Merge and follow-up
Use a merge commit, not squash, to preserve subtree ancestry. The system mirror already has an active ruleset allowing the split app to bypass it; no ruleset change was needed.
After merge, confirm Appwrite’s Split succeeds, then remove
packages/systemfromutopia-php/monorepoand refresh its graph in a follow-up PR. Retain the standalone mirror, release tags, and consumer Packagist constraints. Confirm the old splitter stops publishing system. No open PRs were found on the system mirror during selection.Closes #13803.