augushong
|
39d01d8175
|
fix(stack): dev-sync 镜像钉定 redis 扩展版本绕过 PECL 元数据故障
|
2026-08-15 14:21:23 +08:00 |
|
augushong
|
4d71c6553a
|
fix(admin): 修复监控规则表单提交失效与页面转义及搜索入口缺陷
|
2026-08-15 11:44:33 +08:00 |
|
augushong
|
5a41f6a425
|
fix(admin): 修复详情页弹层内接口请求路径解析错误
|
2026-08-15 10:56:01 +08:00 |
|
augushong
|
8de759394c
|
docs(stack): XHProf 后台化验证报告
|
2026-08-15 10:48:24 +08:00 |
|
augushong
|
296269d66d
|
fix(admin): 修复命中记录页时间渲染依赖不存在的 API
|
2026-08-15 10:48:15 +08:00 |
|
augushong
|
79dc98e3e4
|
feat(admin): XHProf 菜单与权限配置
菜单为运行时 DB 数据(ul_system_menu),本仓库无代码改动;本提交为计划 Todo 8 里程碑标记。
落库内容(docker-dev 环境):
- 系统管理(pid 实查=228) 下新增分组 304 性能分析
- 305 采样列表 xhprof.run/index、306 命中记录 xhprof.run_watch/index、307 监控规则 xhprof.watch/index(auth_node 与 href 同值)
复现命令(幂等需先查后建,admin:menu:create 无唯一性拦截):
php think admin:menu:create --title=性能分析 --icon=fa.fa-tachometer --parent-id=<系统管理id> --sort=0
php think admin:menu:create --title=采样列表 --path=xhprof.run/index --node=xhprof.run/index --icon=fa.fa-list --parent-id=<性能分析id> --sort=0
php think admin:menu:create --title=命中记录 --path=xhprof.run_watch/index --node=xhprof.run_watch/index --icon=fa.fa-crosshairs --parent-id=<性能分析id> --sort=0
php think admin:menu:create --title=监控规则 --path=xhprof.watch/index --node=xhprof.watch/index --icon=fa.fa-eye --parent-id=<性能分析id> --sort=0
验证:admin:permission:nodes 含 xhprof.* 节点;四页面 200;菜单树经 /admin/ajax/initAdmin 渲染确认(清缓存后生效)。证据:.omo/evidence/task-8-xhprof-log-backend.txt
|
2026-08-15 07:37:41 +08:00 |
|
augushong
|
f611ab385c
|
feat(admin): XHProf 运行详情页函数级分析
|
2026-08-15 07:20:29 +08:00 |
|
augushong
|
c980ebdff0
|
feat(admin): XHProf 函数监控规则与命中记录
|
2026-08-15 07:02:37 +08:00 |
|
augushong
|
e57b186126
|
feat(admin): XHProf 采样列表页
- curd -t ul_xhprof_run 生成三件套(控制器 xhprof.run 子目录形态,model docblock 随生成刷新)
- 只读化:toolbar 清空 + 行内仅详情按钮(open 弹层 xhprof.run/detail?id=N,auth=detail),
add/edit/delete 等 action 保留靠权限节点不分配拦截(T8 对齐)
- 列渲染:wall_time/cpu_time μs→ms(>1000ms 红色)、memory_peak 字节→MB、
url 截断 title 全显、method 标签化、request_time 浮点秒→日期时间
- 四组搜索:url like / request_time range / wall_time 下限(前端 ms,后端换算 μs,
withGet 全量合并写回)/ node_id 下拉(DISTINCT + data_brage 通道)
- 生成前 scheme:sync 修复 request_time 的 null/comment 漂移(T3 手工 ALTER 遗留)
|
2026-08-15 06:48:45 +08:00 |
|
augushong
|
a43a9a48b9
|
feat(tools): XHProf 日志导入三层服务与函数监控物化
- XhprofProfileParserService(Base/App):纯数组解析 jsonl 行,
meta 字段以真实 fixture 为准;simple_url 缺失兜底与采集端回调同算法;
watch 正则按 callee 物化(ct/wt_sum/wt_max),非法正则编译计 fail 跳过
- XhprofLogReaderService(Base/App):增量读取,半行缓冲超限整行丢弃
(不照抄 nginx 8MB 强制切行);EOF 无换行半行不 yield 不推进 offset;
进度不自动落盘,由导入侧在同一事务内显式 savePosition
- XhprofLogImport 定时任务(Base/App):不受 XHPROF_ENABLE 门控,
runs-*.jsonl 按文件名序增量导入;run 逐条 insert + detail chunk 20
insertAll + run_watch insertAll 与 position 同事务落盘;导至 EOF 后
只删已导完文件
- 修复 T1 缺陷:request_time decimal(12,3) 装不下 10 位时间戳,
Scheme 与 migration 同步改 decimal(13,3)
- 新增 parser 单元测试(真实 fixture 断言,9 用例 42 断言)
与 jsonl fixture;phpunit 注册 unit 测试套件
|
2026-08-15 06:11:01 +08:00 |
|
augushong
|
b472df8c1d
|
feat(tools): XHProf 数据清理任务与定时注册
|
2026-08-15 05:47:34 +08:00 |
|
augushong
|
7e73902325
|
feat(admin): XHProf 性能日志五张表 Scheme 迁移与模型
|
2026-08-14 22:04:52 +08:00 |
|
augushong
|
da388a8c4f
|
feat(stack): XHProf 采集切换文件落盘并独立 xhgui 供应
|
2026-08-14 21:58:29 +08:00 |
|
augushong
|
e0e2580646
|
feat(stack): 所有 Docker 模式集成 XHProf 性能分析
在 docker-dev/docker-dev-sync/docker-serve/full 四个模式中集成 XHProf
性能分析能力,默认不启用(--profile xhprof 按需开启),零侵入不改
业务代码和 run.sh。
核心组件:
- source/docker/xhprof-bootstrap.php: 采集器初始化(auto_prepend_file)
- source/docker/xhgui-config.php: XHGui 认证配置(Basic Auth)+ PDO 存储
- 各 Dockerfile: 安装 PECL xhprof 扩展 + php-profiler 到 /opt/xhprof/
- 各 docker-compose: 新增 xhgui 服务(profiles: xhprof),端口 8142
存储方案:PDO MySQL(复用现有 MySQL),避免 MongoDB PHP 驱动兼容性问题。
docker-dev/docker-dev-sync 开箱即用;docker-serve/full 需配置 XHGUI_PDO_DSN。
认证:HTTP Basic Auth,默认 admin/xhgui123,环境变量可覆盖。
采集控制:XHPROF_ENABLE 环境变量 + cookie _profiler 强制触发 + 1% 采样。
Dockerfile.base 同步新增 xhprof 扩展(框架作者需重建推送基础镜像)。
|
2026-08-09 09:07:10 +08:00 |
|
augushong
|
af0988118a
|
docs(rules): 新增 project-update-strategy 更新策略规则模板
|
2026-08-08 19:09:36 +08:00 |
|
augushong
|
a7a80417ef
|
docs(skill): 新增纯拉取模式工作流与更新策略规则机制
|
2026-08-08 19:09:26 +08:00 |
|
augushong
|
0e1df3852d
|
feat(update): 新增 admin:update --fetch-only 纯拉取模式
|
2026-08-08 19:09:21 +08:00 |
|
augushong
|
ad96755ff5
|
docs(permission): 统一校准权限节点措辞,消除更新节点误解
admin:permission:nodes 是查看型命令(实时扫描注解、不写库、改注解即生效),但文档/注释多处用一键更新/自动更新/生成等动作词描述,导致开发者系统性误以为它是更新权限节点命令。本次校准 8 个文件 10 处误导措辞,并在命令输出末尾追加机制提示。@NodeAnotation 拼写保持不变(框架故意少一个 t)。
|
2026-08-08 18:21:25 +08:00 |
|
augushong
|
7341268ceb
|
fix(docker): run.sh 加 umask 000 + 预创建 runtime 子目录
bind mount 模式下 Dockerfile 的权限处理被宿主目录覆盖,
PHP 新建的子目录(runtime/cache/da/ 等)默认 755 导致 www-data 无法写入。
- 开头加 umask 000 让子进程创建的文件/目录全局可写
- mkdir 预创建 cache/log/temp/session/nginx 子目录
- docker-dev 和 docker-dev-sync 同步修复
|
2026-08-08 10:33:44 +08:00 |
|
augushong
|
8faa52ce90
|
feat(nginx-log): 多节点适配(node_id 全链路 + 全局/按节点聚合 + 节点筛选 + v2.4.0 升级脚本)
- 6 张表加 node_id 字段 + position/stat 改复合唯一键(migration)
- 6 个 Scheme 同步 node_id 注解 + 唯一键
- Reader 带 node_id 参数 + 懒加载接管(getLastPosition 回退查 node_id='')
- Aggregator 全局行(node_id='')+ 按节点循环 insertAggregatesForScope
- Stat 所有查询方法加 where node_id 条件
- Dashboard 控制器/视图加节点筛选下拉框 + AJAX 带 node_id
- AccessLog 列表加节点列 + 采集进度卡片显示节点信息
- import 定时任务 run_type 改 all(每节点采集自己的日志)
- v2.4.0 升级脚本追加 ALTER TABLE(幂等 check-then-alter)
- 菜单调整:去掉 Nginx 顶级菜单 + 读取位置管理,改为系统管理下挂两个子菜单
- ulthon-timer 文档补充 run_type=all 多节点部署注意事项
|
2026-08-08 10:33:20 +08:00 |
|
augushong
|
f1a2e8fd5d
|
fix(nginx-log): service 文件加 Service 后缀(命名规范合规)
F2 Code quality review 发现:3 个新增 service 未遵守
.agents/rules/ulthon-naming-convention.md 第 19 行规定
(service 模块文件名需带 Service 后缀)。
变更:
- 重命名 6 个文件(3 Base + 3 App):
NginxLogParser(Base)→NginxLogParserService(Base)
NginxLogReader(Base)→NginxLogReaderService(Base)
NginxLogAggregator(Base)→NginxLogAggregatorService(Base)
- 同步类名、use、类型 hint、new 引用
- NginxLogReaderServiceBase 异常消息前缀同步加 Service
- controller Base 引用更新(NginxLogImportBase / NginxLogStatAggregateBase)
验证:
- php -l 全部 8 个文件语法通过
- grep 残留旧名 = 0 结果(24 处引用全部带 Service 后缀)
|
2026-07-28 06:57:13 +08:00 |
|
augushong
|
0f9f12174c
|
test(nginx-log): 权限节点扫描 + 端到端 QA 验证 + curd 路径修复
- 跑 admin:permission:nodes 扫描 138 个权限节点(17 个 nginx 相关节点)
- 17 个 nginx 节点 assign 给 role-id=1(写入 ul_system_auth_node 满足 plan 验收)
- curd 路径修复:菜单 href 由 system.nginx_access_log/index 改为 nginx.access_log/index(匹配 curd 生成的实际 URL,方案 B)
- SystemMenu.php / v2.4.0.php / DB ul_system_menu 三处同步(含 id=303 log_position)
- dashboard id=301 system.nginx_log_stat/index 保持不变(控制器确实在 system 模块)
- 端到端 QA 全通过:100 行日志 → import 74 行(静态过滤)→ aggregate stat_hour=1/url=6 → dashboard 数据完整
- 修复 T10 遗留 bug:cleanStatTables 用 Unix 时间戳当阈值,与 stat_date YYYYMMDD 不匹配导致误删
- threshold 从 strtotime('today')-days*86400 改为 (int) date('Ymd', strtotime('today')-days*86400)
- 验证:366 天前 stat 数据被删,今天 stat 数据保留
- 权限隔离:超管可访问,未登录被拦(code=40101 请先登录后台)
- Evidence: .omo/evidence/task-16-nginx-log-analytics-e2e/(15 个文件)
|
2026-07-28 06:47:24 +08:00 |
|
augushong
|
8a5a0d9877
|
feat(nginx-log): NginxLogStat dashboard 视图与 JS(echarts 趋势图)
|
2026-07-28 06:34:30 +08:00 |
|
augushong
|
3e983d8b8f
|
feat(nginx-log): adminUpdateCodeData v2.4.0 存量升级代码(sysconfig + 菜单幂等补齐)
|
2026-07-28 06:28:17 +08:00 |
|
augushong
|
d5329cdd45
|
feat(nginx-log): curd 生成 raw/position 后台并改只读
- NginxAccessLog + NginxLogPosition Scheme 加 #[Component] 注解
- Scheme Table name 补 ul_ 前缀(curd 严格校验要求)
- curd 生成 nginx 模块完整后台(controller/model/view/js)
- Base/App 双层只读控制器(参照 TimerLogBase 范式)
- AccessLogBase: add/edit/delete/modify 全部 error
- LogPositionBase: 同上
- 视图改造:
- access_log 裁剪到 8 列核心字段(time_local/method/uri/status/remote_addr/request_time/body_bytes_sent/http_user_agent)
- status/request_time 自定义 badge 渲染
- toolbar 清空 + operat 仅保留详情(B 类只读页面)
- log_position 全字段 + 只读化
- HTTP 验证:index 200 OK + add/edit/delete/modify 全部返回错误
|
2026-07-28 06:21:13 +08:00 |
|
augushong
|
7987001cd2
|
feat(nginx-log): NginxLogStat dashboard 控制器(Base/App 双层,日/周/月/年聚合)
- extend/base/admin/controller/system/NginxLogStatBase.php:完整逻辑
- @ControllerAnnotation(title=Nginx访问统计) + @NodeAnotation(title=访问统计)
- index() 页面/接口同体:isAjax() 返回 JSON,否则 fetch()
- period 解析:day(24h)/week(7d)/month(30d)/year(12m)/custom,invalid 自动 fallback day
- custom start>end 自动 swap
- 整体指标:SUM stat_hour,avg_request_time 按 PV 加权平均
- 趋势:day 按 stat_hour 聚合补 0-23;week/month/custom 按 stat_date 补日期序列;year 按 (stat_date DIV 100) 聚合补 1-12 月
- Top N:sysconfig('nginx_log','topn_default',10),topN=0 不截断
- 跨周期 UV 标注:uv_is_estimate = period !== 'day'
- 空表/空范围不崩(返回 0/[])
- app/admin/controller/system/NginxLogStat.php:App 入口,仅 extends Base
性能:stat_hour 10 万行 + period=year 服务端 < 700ms(< 2s 要求)
依赖:T1 stat 模型、T9 Aggregate;blocks:T13 视图
|
2026-07-28 06:17:22 +08:00 |
|
augushong
|
2b677c6f89
|
feat(nginx-log): NginxLogStatAggregate 定时任务 + timer config 注册
|
2026-07-28 06:02:07 +08:00 |
|
augushong
|
8eaa672ed6
|
feat(nginx-log): NginxLogClean 定时任务 + timer config 注册(完成 3 个 nginx 任务)
|
2026-07-28 06:00:15 +08:00 |
|
augushong
|
13b1313e92
|
feat(nginx-log): NginxLogImport 定时任务 + timer config 注册(Base/App 双层)
|
2026-07-28 05:48:46 +08:00 |
|
augushong
|
ceb73c750a
|
feat(nginx-log): NginxLogAggregator 聚合 service(Base/App 双层,delete-then-insert 幂等)
|
2026-07-28 00:52:51 +08:00 |
|
augushong
|
9fe55f81bf
|
feat(nginx-log): NginxLogReader 增量读取 service(Base/App 双层,含轮转检测)
|
2026-07-28 00:39:11 +08:00 |
|
augushong
|
7d707c2150
|
feat(nginx-log): NginxLogParser 解析器 service(Base/App 双层)
|
2026-07-28 00:38:25 +08:00 |
|
augushong
|
c4b72913df
|
feat(nginx-log): .example.env 增加 [NGINX_LOG] 配置节(默认关闭)
|
2026-07-28 00:24:39 +08:00 |
|
augushong
|
ce191adfd8
|
feat(nginx-log): 4 个 stack 模板增加 log_format 与 access_log 配置(Docker 开箱即用)
|
2026-07-28 00:24:26 +08:00 |
|
augushong
|
3405f8de60
|
feat(nginx-log): adminInitData 增加 nginx_log 默认配置(保留策略/topN/静态排除)
|
2026-07-28 00:18:56 +08:00 |
|
augushong
|
0d19881a22
|
feat(nginx-log): 新增 6 张表 phinx migration + Scheme + model
|
2026-07-28 00:03:49 +08:00 |
|
augushong
|
f48e0947cb
|
docs(timer): 技能文档补充 Docker 模式自动启动说明
新增 Docker 部署章节:server 模式自动启动 timer(nohup + --local --quiet),多节点天然隔离(runtime/node_id.lock 独立)。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-26 09:53:45 +08:00 |
|
augushong
|
97eb8ca99a
|
fix(timer): timer_log 列表页补全刷新按钮与事件监听方法修正
toolbar 从 [] 改为 ['refresh'](B 类只读页面保留刷新),ua.table.on 修正为 layui.table.on。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-26 09:53:27 +08:00 |
|
augushong
|
739b536f8d
|
fix(host): Host 控制器禁用手动增删改与按钮配置修正
HostBase 补 add/edit/delete/modify 禁用方法(节点自动注册,不支持手动操作)。_common.js 的 addUrl/editUrl/deleteUrl/exportUrl/modifyUrl 改空字符串。index.js 补 toolbar: ['refresh'](C 类页面,去掉默认的 add/delete/export)。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 22:40:05 +08:00 |
|
augushong
|
908f84ee9f
|
refactor(timer): TimerLog 控制器迁移到 Base 层 + toolbar 与事件监听修正
控制器逻辑移入 extend/base/admin/controller/system/TimerLogBase.php,app 层改为空壳继承。index.js 补 toolbar:[] + defaultToolbar:['filter'](B 类只读页面),修正 ua.table.on → layui.table.on。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 22:39:53 +08:00 |
|
augushong
|
009647f96f
|
refactor(timer): TimerConfig 控制器与视图迁移到 Base 层
控制器逻辑移入 extend/base/admin/controller/system/TimerConfigBase.php,app 层改为空壳继承。9 个视图文件迁移到 extend/base/admin/view/system/timer_config/。index.js 补 toolbar: ['refresh', 'export'] 声明(C 类页面,去掉默认的 add/delete)。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 22:39:20 +08:00 |
|
augushong
|
1d704fc32c
|
fix(migration): 新增增量 migration 补齐 timer_config 与 system_host 缺失字段
建表 migration(SystemTimerConfig/SystemHost)建表时未含动态管控新增字段(trigger_node_id/last_trigger_time/concurrency/is_master),全新安装走 migrate:run 会缺字段。新增 ALTER migration 增量补齐,保证全新安装表结构完整。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 22:22:47 +08:00 |
|
augushong
|
1b0be9a29b
|
docs(timer): 定时器动态管控技能文档补充四章节
新增并发数动态调整、手动触发定向、多节点协调、clamp 有效域钳制四章节,含 12 个示例对照与 4 个坑位说明。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 21:58:48 +08:00 |
|
augushong
|
12fe271ce0
|
feat(timer): 编辑页并发数配置表单
edit 表单放行 concurrency 字段,空值=继承代码默认写 NULL,正整数=覆盖。前端联动提示语义。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 21:58:20 +08:00 |
|
augushong
|
41a0f99735
|
feat(timer): 列表页节点视角下拉与归属可视化
新增节点视角下拉(全局/指定节点),calcOwnership 计算任务归属,触发操作联动节点选择器定向 trigger_node_id,并发列双通道显示(默认/覆盖值)。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 21:58:07 +08:00 |
|
augushong
|
f13384403a
|
feat(timer): 后台触发/编辑/节点列表控制器改造
trigger 定向 trigger_node_id 必填穿透 status;edit/modify 改 concurrency 后 Cache::inc 递增脏标记触发立即 reload(D18);hostList 返回在线节点;normalizeConcurrency 归一化入库值。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 21:57:56 +08:00 |
|
augushong
|
3db3f7de78
|
feat(timer): syncConfig concurrency 不变量与控制器 cap 防御
TimerServiceBase syncConfig 不覆盖 DB concurrency(NULL=继承代码默认)。TimerControllerBase cap 改 >= 语义,放行 concurrency_id < cap 的 0-indexed 分片。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 21:57:39 +08:00 |
|
augushong
|
f478ae0e4e
|
feat(timer): runLoop 热加载并发实例与运行时配置参数
TimerBase 实现 shouldExecuteTask 手动触发原子消费、reloadRequestList 合并式扩缩容、runLoop 脏标记检测+定时兜底+有效域钳制+drain 优雅缩容+checkTriggerTtl 超时复位。config/timer.php 新增 trigger_ttl/force_reload_interval/drain_max_lifetime 三参数。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 21:57:25 +08:00 |
|
augushong
|
236a343fa9
|
feat(timer): 新增并发数/触发节点/触发时间三字段及幂等分发
Scheme 定义 concurrency(nullable)/trigger_node_id/last_trigger_time 三字段,Model 声明属性,v2.3.0 分发代码幂等 ALTER 保证升级自动同步。
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
2026-07-25 21:57:14 +08:00 |
|
augushong
|
8dce4ab48a
|
docs(deploy): 补充多环境 .env 管理约定
各环境配置文件(.env.test/.env.prod/.env.demo)放在仓库根目录,
部署时流水线将目标文件覆盖为 .env,代码完全一样只有 .env 不同
|
2026-07-23 22:22:52 +08:00 |
|