V1.0.40__harden_job_scheduler_reliability.sql、迁移契约测试,并为 job 插件补充测试依赖。-Penable-tests 的模块测试时,Maven 构建成功但根 POM 默认 forge.tests.skip=true,测试实际跳过;后续测试命令统一显式启用 enable-tests Profile。JAVA_HOME=/opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home PATH=/opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home/bin:$PATH mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dtest=JobReliabilityMigrationContractTest -Dsurefire.failIfNoSpecifiedTests=false testTests run: 7, Errors: 7,失败原因均为缺少 V1.0.40__harden_job_scheduler_reliability.sql,符合先失败预期。Tests run: 7, Failures: 1;根因是契约测试未考虑动态 SQL 字符串中的单引号转义,修正断言后再次执行。Tests run: 7, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS。rg -n '\$\{[^}]+\}' forge-server/db/migration/V1.0.40__harden_job_scheduler_reliability.sql,无输出。git diff --check -- forge-server/db/migration/V1.0.40__harden_job_scheduler_reliability.sql forge-server/forge-framework/forge-plugin-parent/forge-plugin-job/pom.xml forge-server/forge-framework/forge-plugin-parent/forge-plugin-job/src/test/java/com/mdframe/forge/plugin/job/migration/JobReliabilityMigrationContractTest.java,通过。forge_schema_history;不将静态契约测试表述为数据库迁移已实际执行。JobConfigValidatorTest 和 JobMapperXmlContractTest 后执行定向测试,testCompile 因 JobConfigSaveRequest、JobConfigValidator 尚不存在而失败,符合先失败预期。GenericApplicationContext,移除 Mockito 运行时依赖。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dtest=JobConfigValidatorTest,JobMapperXmlContractTest -Dsurefire.failIfNoSpecifiedTests=false test,Tests run: 9, Failures: 0, Errors: 0, Skipped: 0。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dsurefire.failIfNoSpecifiedTests=false test,job 模块 Tests run: 16, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS。xmllint --noout 校验 SysJobConfigMapper.xml 和 SysJobLogMapper.xml,通过。rg -n 'LambdaQueryWrapper' .../service 无输出。git diff --check -- forge-server/forge-framework/forge-plugin-parent/forge-plugin-job,通过。JobSchedulerTest、JobScheduleCoordinatorTest 后定向测试因 JobScheduleException 和 JobScheduleCoordinator 尚不存在而 testCompile 失败,符合先失败预期。JobScheduler 的新增、更新、删除、暂停、恢复、触发、Cron 更新和存在性检查不再捕获异常后返回 false;统一抛出 JobScheduleException。JobScheduleCoordinator,按 JobKey 对 Quartz 执行新增或替换,并根据数据库状态暂停/恢复;成功写 SYNCED,普通失败写 FAILED,删除失败保留 DELETE_PENDING 并记录错误。retrySynchronization 会清理普通失败错误并重新同步;删除重试保持 DELETE_PENDING 意图,避免误恢复为普通任务。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dtest=JobSchedulerTest,JobScheduleCoordinatorTest -Dsurefire.failIfNoSpecifiedTests=false test,Tests run: 5, Failures: 0, Errors: 0, Skipped: 0。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dsurefire.failIfNoSpecifiedTests=false test,job 模块 Tests run: 21, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS。JobScheduler.java 中无调度操作 return false 或 boolean CRUD 签名。xmllint --noout,job 插件目录通过 git diff --check。JobAutoRegistrar 只按 job_name + job_group 登记数据库期望配置,不覆盖既有配置、不直接操作 Quartz;新增 JobStartupReconciler 作为唯一 ApplicationRunner 恢复入口;删除旧 JobConfigLoader。JobScheduleCoordinator.reconcileOnStartup(),按数据库期望状态补建或更新 Quartz 任务,禁用任务保持暂停,不扫描或删除数据库之外的 Quartz Job。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dtest=JobAutoRegistrarTest,JobStartupRecoveryContractTest,JobScheduleCoordinatorTest -Dsurefire.failIfNoSpecifiedTests=false test,Tests run: 8, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dsurefire.failIfNoSpecifiedTests=false test,job 模块 Tests run: 26, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS。Scheduler has been shutdown 错误栈,但断言通过,不是构建失败。SysJobConfigMapper.xml、SysJobLogMapper.xml 通过 xmllint --noout;job 插件与 starter-job 目录通过 git diff --check。JobLogSanitizerTest、JobExecutionLogContractTest 后执行定向测试,testCompile 因 JobLogSanitizer 尚不存在而失败,符合先失败预期。JobMonitor 写入前脱敏;日志分页和详情读取时再次清洗,历史记录也不会直接返回原始敏感值;QuartzJobExecutor 不再向应用日志输出原始结果或异常内容。jobConfigId,计划触发记录 SCHEDULED,立即运行覆盖为 MANUAL,最终写入 sys_job_log.job_config_id/trigger_type。trigger_time >= startTime 和 trigger_time <= endTime;前端改为发送本地 yyyy-MM-dd HH:mm:ss,避免原 toISOString() 的 UTC 偏移和后端格式不匹配。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dtest=JobLogSanitizerTest,JobExecutionLogContractTest,JobMapperXmlContractTest,JobSchedulerTest -Dsurefire.failIfNoSpecifiedTests=false test,Tests run: 11, Failures: 0, Errors: 0, Skipped: 0。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dsurefire.failIfNoSpecifiedTests=false test,job 模块 Tests run: 33, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS。v20.19.0 下执行 pnpm exec eslint src/views/system/job-log-list.vue,首次发现一处 prefer-template,修正后复跑无输出、退出码 0。SysJobLogMapper.xml 通过 xmllint --noout;job 插件和日志页面通过 git diff --check。POST /job/config/{id}/sync,Controller 调用 retrySynchronization;保存已落库但 Quartz 同步失败时返回“任务配置已保存,但调度同步失败,请在列表中点击‘重新同步’”,避免用户误以为配置完全失败或完全成功。FAILED、DELETE_PENDING 提供“重新同步”;编辑时任务名称和分组禁用;立即运行增加“不改变当前启停状态”的确认;启停、删除、重新同步及同步失败保存后刷新列表,避免乐观版本和同步状态停留在旧值。JobSyncApiContractTest 后,接口契约因缺少 JobConfigController.sync(Long) 报 NoSuchMethodException,UI 契约断言同步入口失败,符合先失败预期。JobSyncApiContractTest,接口和 UI 两项契约 2/2 通过。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dsurefire.failIfNoSpecifiedTests=false test,job 模块 Tests run: 35, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS。v20.19.0 下执行 pnpm exec eslint src/views/system/job-config.vue src/views/system/job-log-list.vue,无输出、退出码 0。v20.19.0 下执行 NODE_OPTIONS=--max-old-space-size=8192 pnpm build,8699 modules transformed,built in 1m 28s,退出码 0。// 注释、组件命名冲突和大包体提示;未发现指向本次定时任务页面的编译错误,不阻断本阶段。triggerJob 现要求 sync_status=SYNCED,否则提示“任务尚未同步到调度服务,请先重新同步”;前端仅对已同步任务展示“运行一次”。DELETE_PENDING 任务只保留“重新同步”和“查看日志”,避免编辑、启停、再次删除或触发执行与删除意图冲突。SysJobConfigServiceImplTest,JobSyncApiContractTest 共 4/4 通过;前端定向 ESLint 和相关 git diff --check 同时通过。mvn -Penable-tests -pl forge-framework/forge-plugin-parent/forge-plugin-job -am -Dsurefire.failIfNoSpecifiedTests=false test,Tests run: 37, Failures: 0, Errors: 0, Skipped: 0,Reactor BUILD SUCCESS,总耗时约 14 秒。mvn -pl forge-admin-server -am package -DskipTests,42 个 Reactor 模块全部 SUCCESS,最终 BUILD SUCCESS,总耗时约 46 秒。v20.19.0 下定向 ESLint 无输出、退出码 0;pnpm build 完成 8699 modules transformed,built in 1m 57s,退出码 0。SysJobConfigMapper.xml、SysJobLogMapper.xml 经 xmllint --noout 通过;Service 未发现 LambdaQueryWrapper;本变更范围 git diff --check 通过。Scheduler has been shutdown 堆栈;Maven 存在仓库既有废弃 API/未检查操作提示;Vite 存在组件命名冲突、动态/静态导入、CSS // 注释和包体提示。with_server.py --help。Vite dev 因本机文件监听达到上限报 EMFILE: too many open files, watch;改用生产构建 preview 后,本地端口绑定被沙箱以 listen EPERM 拒绝。辅助脚本均已停止本轮进程,没有遗留服务。