Repository navigation
chore: absorb console into packages/console - #13925
Conversation
fully-qualified function calls
…n Psalm analysis.
- 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
chore: widen utopia-php/validators to 0.3.*
docs: enforce documentation style with Vale
docs: centralize CODE_OF_CONDUCT and CONTRIBUTING at the monorepo root
Allow validators 0.4 in dependent packages
Allow validators 0.5 in dependent packages
chore: require validators 0.6
…console-http-queue chore: move servers, console, http and queue onto validators ^1.0
chore: stop committing package lock files
# Conflicts: # composer.lock
# Conflicts: # rfc/monorepo.md
|
| { | ||
| $this->ensurePlain(); | ||
|
|
||
| if (! preg_match('/^-[A-Za-z0-9]+$|^--[A-Za-z0-9][A-Za-z0-9_-]*$/', $key)) { |
There was a problem hiding this comment.
Regex validators violate guidance. The imported flag and option validators add
preg_match() expressions. The repository guide says not to add regular expressions; it requires string operations or an existing validator unless the PR explains why neither works. The option validator and a test validator repeat this pattern. This repository requirement needs to be satisfied before merging.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/console/src/Command.php
Line: 100
Comment:
**Regex validators violate guidance.** The imported flag and option validators add `preg_match()` expressions. The repository guide says not to add regular expressions; it requires string operations or an existing validator unless the PR explains why neither works. The option validator and a test validator repeat this pattern. This repository requirement needs to be satisfied before merging.
**Context Used:** AGENTS.md ([source](https://github.com/appwrite/appwrite/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| new Command('publish'), | ||
| ); | ||
|
|
||
| $this->assertSame("( 'build' || 'build:fallback' ) && 'publish'", $command->toString()); |
There was a problem hiding this comment.
Tests pin command formatting. These assertions require exact quoting, spacing, and grouping in the command builder’s string output, even though other tests check what the commands do when executed. A harmless formatting change could therefore break several tests. The repository instruction requires tests of observable behavior rather than assertions coupled to implementation details. This requirement needs to be satisfied before merging.
Context Used: Call out and harshly judge implementation-coupled tests. We don't mirror source code, configuration, or version pins in assertions. We test observable behavior; use linters for syntax and schema checks. (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/console/tests/ConsoleTest.php
Line: 281
Comment:
**Tests pin command formatting.** These assertions require exact quoting, spacing, and grouping in the command builder’s string output, even though other tests check what the commands do when executed. A harmless formatting change could therefore break several tests. The repository instruction requires tests of observable behavior rather than assertions coupled to implementation details. This requirement needs to be satisfied before merging.
**Context Used:** Call out and harshly judge implementation-coupled tests. We don't mirror source code, configuration, or version pins in assertions. We test observable behavior; use linters for syntax and schema checks. ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| public function testExecuteEnvVariables(): void | ||
| { | ||
| $randomData = base64_encode(random_bytes(10)); | ||
| putenv("FOO={$randomData}"); |
There was a problem hiding this comment.
Test leaks an environment variable. This test overwrites process-wide
FOO without restoring its previous value. It runs in the shared root packages suite without process isolation, so later tests inherit the unexpected value and any existing value is lost for the rest of the run. Save and restore the prior value even if an assertion fails.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/console/tests/ConsoleTest.php
Line: 134
Comment:
**Test leaks an environment variable.** This test overwrites process-wide `FOO` without restoring its previous value. It runs in the shared root packages suite without process isolation, so later tests inherit the unexpected value and any existing value is lost for the rest of the run. Save and restore the prior value even if an assertion fails.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
|
||
| ## System requirements | ||
|
|
||
| Utopia Console requires PHP 8.0 or later. We recommend using the latest PHP version whenever possible. |
There was a problem hiding this comment.
PHP minimum is misstated. The README says PHP 8.0 or later is supported, but the package manifest requires PHP 8.5 or later. A standalone consumer following the README cannot install the package on PHP 8.0–8.4.
| Utopia Console requires PHP 8.0 or later. We recommend using the latest PHP version whenever possible. | |
| Utopia Console requires PHP 8.5 or later. We recommend using the latest PHP version whenever possible. |
Knowledge Base Used: Reusable platform packages
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/console/README.md
Line: 131
Comment:
**PHP minimum is misstated.** The README says PHP 8.0 or later is supported, but the package manifest requires PHP 8.5 or later. A standalone consumer following the README cannot install the package on PHP 8.0–8.4.
```suggestion
Utopia Console requires PHP 8.5 or later. We recommend using the latest PHP version whenever possible.
```
**Knowledge Base Used:** [Reusable platform packages](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/appwrite/-/docs/reusable-platform-packages.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
# Conflicts: # composer.lock
# Conflicts: # composer.lock
# Conflicts: # composer.lock
Summary
Moves
utopia-php/consoleintopackages/consoleso Appwrite loads it directly. Wave 2 of #13828, following the playbook inrfc/monorepo.md. The mirror head7bd79458is the0.2.9commit Appwrite already locks, so the code Appwrite runs does not change.Add 'packages/console/' from commit '7bd79458…'chore(console): mirror plumbingmirror.ymlpoints at this repository'smirror-redirect; README banner points hererefactor: load console from packages/replace,requireline dropped, lock updated, step A shape,BAREentry, baselinedocs(rfc): list the console baseline as its own phase 8 bulletmainmain's and re-runningbin/monorepo autoload+composer update --lockDetails
Utopia\prefixUtopia\ConsoleandUtopia\Commandlive at the namespace root, so the package keepsUtopia\→src/until step B (phase 6).bin/monorepo'sBAREgainsconsole => Console; the root bare list is nowpackages/console/src,packages/validators/src. No classes renamedsrc/0.2.9is Pint'sfn (spacing inCommand.php.rector.phpskips the constructor-promotion and readonly rules; Rector changes nothingtests/Console/ConsoleTest.php→tests/ConsoleTest.php(alreadyUtopia\Console\Tests), with a matchingautoload-deventrytestLogsassertedConsole::confirm()againstphpunit < tests/input.txt, which the rootpackagessuite cannot pipe (it would hang on a TTY or fail on a closed stdin). Theconfirm()assertion moved totestConfirm, which runs atests/resources/confirm.phpfixture throughConsole::execute()with the answer on stdin.input.txtis gone andcomposer testis the standard scripttests/resources/loop.phprequired../../vendor/autoload.php, which only exists in a standalone install. Fixtures now go throughtests/resources/autoload.php, which falls back to the rootvendor/LICENSE.md→LICENSE;phpunit.xml,.gitignorematch the sibling packages; standalonephpstan.neonat level max oversrcandtestsphpstan-baseline.neonwith 8 findings, all insrc(the package had no PHPStan config of its own): uncheckedfopen()/fgets()inconfirm(), the untyped$cmdarray inexecute(), string-keyed variadic arrays passed tocompose(). Added to the RFC phase 8 listphpandutopia-php/validators, which is already absorbed.database(still vendored) requiresutopia-php/console;replacesatisfies itNote: the console unit tier takes about 55 s (
testLoopruns a 30 s loop, plus the stream and timeout tests), which now runs in the rootpackagessuite.Validation
bin/monorepo validatebin/monorepo check consolebin/monorepo test consolevendor/bin/phpunit packages/console/tests(root autoload, no packagevendor/)vendor/bin/phpunit --testsuite packages --filter 'Utopia\\Console'packages/cacheCodecTestdata providers because the host lacks igbinary (unrelated, CI's image has it)Functions/Workers/Builds.php,Certificates/LetsEncrypt.php,Platform/Action.php,Tasks/Maintenance.php,Tasks/Install.php,Tasks/Interval.phpcomposer validate --no-check-publishplatformexact-version warning)mainutopia-php/console0.2.9, plus the content hashbin/monorepo split console --dry-runc65179da, fast-forwards from the mirror head7bd79458(2 commits), tree identical topackages/consolegit diff --check,composer lintMirror
mainruleset (id17613338) with the split app as always-bypass, so the absorb ran with--skip-rulesetbranches/main/protection→ 404)utopia-php/consoleutopia-php/monorepoPRs touchingpackages/consoleAfter merge
git-subtree-*annotation and orphans the package from its mirrorSplitutopia-php/consoleutopia-php/monorepopackages/consolethere🤖 Generated with Claude Code