Repository navigation
Conversation
PR #91 合并后 main 上 webman start 即崩(route.generated.php 被当配置 装载),单测/PHPStan/打包自检全绿没拦住,缺「真把服务起起来」这步。 tools/boot-smoke.sh 两种形态各起一次 webman:开发形态直接在 server/ 源码起,生产形态构建发布包解到临时目录后起。随机空闲端口(避开占用 黑名单)、PID 记录与 trap 兜底清理、无库可跑、逐项 PASS/FAIL/SKIP。 覆盖进程存活、SPA 页面(无构建产物时降级 SKIP)、探针端点、契约路由 非成功信封、未登录 401、生产包 dev-only 端点全 404、运行日志无 Fatal。 pre-merge.sh --fast 追加开发形态冒烟(实测整段约 2s,≤30s 预算); --full 两形态都跑。新建 .github/workflows/fast.yml 快档:构建 web/ 让 SPA 断言走严格路径后跑 pre-merge --fast,触发 push/PR 到 main。 boot-smoke.sh 属开发期门禁工具,登记进 dev-only-paths 不随包发布。
3 次端口尝试原先各自重算 deadline,最坏 3×TIMEOUT,--fast 档理论可达 45s,超过冒烟 ≤30s 的约定。改为进重试循环前算一次总 deadline,每次 尝试前先看剩余预算,到点即放弃并 FAIL。
源码检出带 server/.env 是开发机常态,原守卫直接 FAIL 使 pre-merge 在开发机上必败。dev 形态改为 rsync 到 mktemp 副本 再起:.env/.env.*/webhook*.env 按 basename 排除,文件根本不 被打开;根级 *.key/*.pem、private/、runtime/ 同挡;contract/ 按 GeneratedIntegrity 的 dirname(server) 查找规则同步进副本, .sand-dev-build 与 .env.example 保留。run_form 的 .env FAIL 守卫保留为不变量,生产包混入或排除失效仍拦。无库行为与检查 项不变,#91 装载期崩溃在 dev/prod 两形态复现仍 FAIL。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
sandadmin-artd/.env 由 vendor FrontendPublisher 发布前端源码时生成, 只含构建期消费的 VITE_* 公开变量。原自检对它豁免后 tar 收尾仍会 读取该文件,在禁止读 .env 的沙箱/受限环境里 EPERM;且发布语义本 就是包内零 .env。改为自检前物理删除(含 .env.development)并去掉 豁免,按零残留断言,门禁更严而非更松。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
背景
PR #91 合并后 main 上
webman start直接崩(route.generated.php被Config::loadFromDir当配置装载,Route::调用即致命),单测、PHPStan、打包自检全绿却没拦住,PR #92(98c88a0)才修好。门禁缺「真把服务起起来」这一步,本 PR 补上。做了什么
tools/boot-smoke.sh(新):两种形态各真起一次 webman——开发形态直接在server/源码起,生产形态先tools/build-release.sh出包、解到临时目录再起。随机空闲端口(避开占用黑名单,3 次尝试共享--timeout总预算)、PID 记录 + trap 兜底只杀自己起的进程、临时目录全部mktemp -d、不依赖数据库(server/.env存在时拒绝跑)。逐项断言:public/index.html存在时严断言/与/login回 200 +id="root"挂载点;源码检出未构建web/时按 README 口径降级 SKIP,CI 快档先构建走严格路径);systemUpdate/probe无挑战按设计 404(仓内无通用 health 端点);/core/system/user真 401;runtime/logs与启动 stdout 无 Fatal/Uncaught。tools/pre-merge.sh:--fast追加开发形态冒烟(实测整段 ~2s,≤30s 预算内);--full两形态都跑。既有开关与豁免语义只加不改弱。.github/workflows/fast.yml(新):仓内原有 CI 只有 dependency-audit(审计 + 发布自检),没有跑单测/静态检查的快档;新建最小快档——构建web/拷入server/public让 SPA 断言严格化,再跑pre-merge.sh --fast,push/PR 到 main 触发。tools/dev-only-paths.txt:登记rm tools/boot-smoke.sh(门禁工具不随发布包);.gitignore放行 fast.yml(与 dependency-audit.yml 同口径)。验证
vendor/bin/phpunit:801 tests 全绿(125 skip 为 DB 依赖)vendor/bin/phpstan analyse:No errorsbash tools/pre-merge.sh --fast:全绿,总耗时 ~4.6s(冒烟 ~2s)tools/build-release.sh全量构建 + 自检:全 PASS,发布包冒烟(APP_ENV=production 起服)7 项 PASSweb/:pnpm test124 文件 530 tests 全绿;pnpm typecheck0 错code/notes --diff(仓内 + 全局两套):0 FAILgit checkout 98c88a0^ -- server/config/route.php server/config/route.generated.php复现 feat(stream): 流式基础层契约与默认实现(StreamWriter/Channel/ProcessProfile) #92 前状态,boot-smoke.sh --devFAIL 退出码 1,Fatal 栈与 feat(stream): 流式基础层契约与默认实现(StreamWriter/Channel/ProcessProfile) #92 提交描述一致。未测项(依赖 DB,输出 SKIP 标注)
说明
sandadmin-artd裸跑vue-tsc --noEmit存在 main 上既有报错(crontab 模块缺 auto-import 符号,本 PR 未触碰该目录),如实记录不属本次回归。