Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a2d578f73b | |||
| 1192dcb6b2 |
@@ -1,10 +1,10 @@
|
|||||||
# 自助棋牌室系统
|
# 自助棋牌室系统
|
||||||
|
|
||||||
本仓库是 `panda/qipai.git` 的单一 Monorepo 工作区。Windows 固定开发路径为 `D:\qipai`,当前权威开发总纲为 [`V5.2.md`](./V5.2.md)。详细功能、模块顺序、验收标准和 Codex 纪律以总纲及 `docs/` 为准。
|
本仓库是 `panda/qipai.git` 的单一 Monorepo 工作区。Windows 固定开发路径为 `D:\qipai`,当前权威开发总纲为 [`V5.3.md`](./V5.3.md)。详细功能、模块顺序、验收标准和 Codex 纪律以总纲及 `docs/` 为准。
|
||||||
|
|
||||||
## 固定约束
|
## 固定约束
|
||||||
|
|
||||||
- 当前权威总纲:`V5.2.md`
|
- 当前权威总纲:`V5.3.md`
|
||||||
- 固定远端:`ssh://git@git.txyundm.cn:2222/panda/qipai.git`
|
- 固定远端:`ssh://git@git.txyundm.cn:2222/panda/qipai.git`
|
||||||
- 默认分支:`main`
|
- 默认分支:`main`
|
||||||
- 生产 API:`https://api.txyundm.cn`
|
- 生产 API:`https://api.txyundm.cn`
|
||||||
@@ -13,9 +13,8 @@
|
|||||||
- 后台 Web:`https://api.txyundm.cn/admin/`
|
- 后台 Web:`https://api.txyundm.cn/admin/`
|
||||||
- 正式 MQTT Broker:`101.42.38.246:1883`
|
- 正式 MQTT Broker:`101.42.38.246:1883`
|
||||||
- 生产系统:Ubuntu Server 24.04 x86-64/amd64,无桌面、无 Docker、无微信云开发
|
- 生产系统:Ubuntu Server 24.04 x86-64/amd64,无桌面、无 Docker、无微信云开发
|
||||||
- 后端运行时:Node.js 20+、npm 10+
|
|
||||||
- 部署入口:Ubuntu 执行 `sudo bash /opt/apps/setup.sh`
|
- 部署入口:Ubuntu 执行 `sudo bash /opt/apps/setup.sh`
|
||||||
- 开发流程:Windows 本地开发与测试 → 完成一个模块 → 更新文档 → commit → SSH push `origin/main`
|
- 开发流程:Windows 本地开发与测试 → 按 M00→M10 固定队列连续编码 → 每个子阶段测试/commit/SSH push/远端校验 → 自动进入下一子阶段
|
||||||
|
|
||||||
## 目录
|
## 目录
|
||||||
|
|
||||||
@@ -36,7 +35,7 @@
|
|||||||
| 用途 | 位置 |
|
| 用途 | 位置 |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 项目入口 | `D:\qipai\README.md` |
|
| 项目入口 | `D:\qipai\README.md` |
|
||||||
| 当前总纲 | `D:\qipai\V5.2.md` |
|
| 当前总纲 | `D:\qipai\V5.3.md` |
|
||||||
| 完整配置索引 | `D:\qipai\docs\configuration.md` |
|
| 完整配置索引 | `D:\qipai\docs\configuration.md` |
|
||||||
| 仓库目录映射 | `D:\qipai\docs\repository-map.md` |
|
| 仓库目录映射 | `D:\qipai\docs\repository-map.md` |
|
||||||
| 后端开发配置 | `D:\qipai\backend\.env.development` |
|
| 后端开发配置 | `D:\qipai\backend\.env.development` |
|
||||||
@@ -100,31 +99,35 @@ WSL 已验证:EMQX `5.8.9`、MQTTX CLI `1.13.0`、EMQX 服务 `active (running
|
|||||||
| Ubuntu 生产 | MQTT | `101.42.38.246:1883` | 待配置 | 待配置 | 禁止复用 WSL 凭据 |
|
| Ubuntu 生产 | MQTT | `101.42.38.246:1883` | 待配置 | 待配置 | 禁止复用 WSL 凭据 |
|
||||||
| Ubuntu 生产 | MySQL | `127.0.0.1:3306` | 待配置 | 待配置 | 配置后写入 `/etc/qipai/qipai.secrets` 并同步更新本表 |
|
| Ubuntu 生产 | MySQL | `127.0.0.1:3306` | 待配置 | 待配置 | 配置后写入 `/etc/qipai/qipai.secrets` 并同步更新本表 |
|
||||||
|
|
||||||
## Codex 工程优先纪律
|
|
||||||
|
|
||||||
- 默认流程:读取必要文档 → 选择一个未完成子阶段 → 先修改工程文件 → 测试 → 增量更新既有文档 → commit → push。
|
## 持续开发规则
|
||||||
- 除用户明确要求只更新文档外,普通开发提交必须包含后端、后台、小程序、迁移、测试、脚本或部署配置中的实质工程变化。
|
|
||||||
- 只修改 Markdown 不得把模块标记为 `DONE`,不得增加功能完成数。
|
- 唯一模块顺序:`M00 → M01 → M02 → … → M10`,模块内按 `A → B → C → …`。
|
||||||
- 禁止连续两个纯文档提交;同一模块子阶段只保留一份开发日志,补丁追加到原日志。
|
- `docs/module-status.md` 顶部的 `execution_cursor` 是唯一续接游标;Codex 不重新规划、不从 M00 重来。
|
||||||
- `docs/current-baseline.md` 使用 `audited_commit` 做增量核验,禁止每次重新生成全量审计。
|
- 一个 commit 只完成一个子阶段;同一次 Codex 会话可连续完成多个相邻子阶段。
|
||||||
- 详细门禁见 `V5.2.md` 的 `0.0 工程编码优先与反文档循环硬门禁`。
|
- 每个子阶段必须完成工程编码、真实测试、增量文档、commit、push,并验证 `HEAD == origin/main`。
|
||||||
|
- 完成一个子阶段后,在会话资源允许时自动继续下一子阶段,不询问“是否继续”。
|
||||||
|
- 纯 Markdown 变更不计业务进度;V5.3 文档提交后的下一次普通开发必须产生工程增量。
|
||||||
|
- 当前游标、最近工程提交和下一工程目标以 `docs/module-status.md`、`docs/current-baseline.md` 为准,不在 README 中猜测。
|
||||||
|
|
||||||
## 当前进度
|
## 当前进度
|
||||||
|
|
||||||
项目已开发部分模块;具体完成度不得从 README 猜测,必须以现有代码、测试、数据库迁移、Git 历史以及 `docs/current-baseline.md`、`docs/module-status.md`、`docs/feature-status.md` 为准。
|
项目已开发部分模块;从 V4.8 切换到 V5.0 后仅新增少量内容。具体完成度不得从 README 猜测,必须以现有代码、测试、数据库迁移、Git 历史以及 `docs/current-baseline.md`、`docs/module-status.md`、`docs/feature-status.md` 为准。
|
||||||
|
|
||||||
- 最近工程提交:`8749a44 test(M01-B): 验证MySQL迁移往返`。
|
- 当前执行游标:`M01-C`。
|
||||||
- 下一工程目标:以 `docs/current-baseline.md` 的 `next_engineering_target` 为准,当前为 M01-B 脱敏旧库结构副本迁移与兼容读取验证。
|
- 最近工程提交:`1192dcb`;M01-B 脱敏旧库副本迁移与兼容读取验证。
|
||||||
- 开发纪律:普通“继续开发”必须产生工程文件变化、测试、commit 和 push;只改 Markdown 不计入模块进度。
|
- 下一工程目标:MySQL outbox、任务表和 PM2 worker 轻量异步任务基础。
|
||||||
|
|
||||||
## 版本递进
|
## 版本递进
|
||||||
|
|
||||||
|
- **V4.8**:固定 `D:\qipai`、`参考/`、Monorepo、Windows/WSL 协作和模块完成即推送。
|
||||||
- **V5.0**:固化 WSL EMQX 5.8.9、MQTTX CLI 1.13.0 和已有代码续接规则。
|
- **V5.0**:固化 WSL EMQX 5.8.9、MQTTX CLI 1.13.0 和已有代码续接规则。
|
||||||
- **V5.1**:同步 README,明确全部配置位置、明文凭据登记和 README 随总纲递进规则。
|
- **V5.1**:同步 README,明确全部配置位置、明文凭据登记和 README 随总纲递进规则。
|
||||||
- **V5.2**:增加工程编码优先、禁止文档循环、基线增量核验和工程证据门禁。
|
- **V5.2**:增加工程编码优先、反文档循环、增量审计和工程完成证据。
|
||||||
|
- **V5.3**:增加固定模块队列、执行游标、会话内自动推进、可中断恢复和跨模块回归检查点。
|
||||||
|
|
||||||
## Codex 入口
|
## Codex 入口
|
||||||
|
|
||||||
```text
|
```text
|
||||||
请阅读 V5.2.md,按当前进度继续开发。
|
请阅读 V5.3.md,按当前进度继续开发。
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const upSql = read('database/migrations/2026061601_m01b_core_schema.up.sql');
|
|||||||
const downSql = read('database/migrations/2026061601_m01b_core_schema.down.sql');
|
const downSql = read('database/migrations/2026061601_m01b_core_schema.down.sql');
|
||||||
const verifySql = read('database/migrations/2026061601_m01b_core_schema.verify.sql');
|
const verifySql = read('database/migrations/2026061601_m01b_core_schema.verify.sql');
|
||||||
const seedSql = read('database/seeds/2026061601_m01b_minimal_seed.sql');
|
const seedSql = read('database/seeds/2026061601_m01b_minimal_seed.sql');
|
||||||
|
const legacyFixtureSql = read('database/fixtures/2026061801_m01b_legacy_schema.sql');
|
||||||
|
|
||||||
const coreTables = [
|
const coreTables = [
|
||||||
'qipai_schema_migrations',
|
'qipai_schema_migrations',
|
||||||
@@ -60,5 +61,16 @@ assert.match(upSql, /legacy_store_id/);
|
|||||||
assert.match(upSql, /legacy_order_id/);
|
assert.match(upSql, /legacy_order_id/);
|
||||||
assert.match(seedSql, /INSERT IGNORE INTO qipai_legacy_table_mappings/);
|
assert.match(seedSql, /INSERT IGNORE INTO qipai_legacy_table_mappings/);
|
||||||
assert.match(seedSql, /member_order_info/);
|
assert.match(seedSql, /member_order_info/);
|
||||||
|
for (const table of [
|
||||||
|
'member_store_info',
|
||||||
|
'member_room_info',
|
||||||
|
'member_order_info',
|
||||||
|
'member_device_info'
|
||||||
|
]) {
|
||||||
|
assert.match(legacyFixtureSql, new RegExp(`CREATE TABLE ${table}`));
|
||||||
|
}
|
||||||
|
assert.match(legacyFixtureSql, /DECIMAL\(10,\s*2\)/);
|
||||||
|
assert.match(legacyFixtureSql, /LEGACY-SANITIZED-001/);
|
||||||
|
assert.doesNotMatch(legacyFixtureSql, /(?:https?:\/\/|@|password|secret|token)/i);
|
||||||
|
|
||||||
console.log('PASS: M01-B migration contract is present.');
|
console.log('PASS: M01-B migration contract is present.');
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
|
import { readFile } from 'node:fs/promises';
|
||||||
|
import { dirname, resolve } from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
import { loadConfig } from '../dist/config.js';
|
import { loadConfig } from '../dist/config.js';
|
||||||
import { closeMySqlPool, createMySqlPool } from '../dist/db/mysql.js';
|
import { closeMySqlPool, createMySqlPool } from '../dist/db/mysql.js';
|
||||||
|
import { LegacyReadRepository } from '../dist/db/legacy-read-repository.js';
|
||||||
import {
|
import {
|
||||||
executeMigrationPlan,
|
executeMigrationPlan,
|
||||||
loadMigrationPlan
|
loadMigrationPlan,
|
||||||
|
splitSqlStatements
|
||||||
} from '../dist/db/migration-runner.js';
|
} from '../dist/db/migration-runner.js';
|
||||||
|
|
||||||
const expectedTables = [
|
const expectedTables = [
|
||||||
@@ -18,6 +23,7 @@ const expectedTables = [
|
|||||||
'qipai_stores',
|
'qipai_stores',
|
||||||
'qipai_tenants'
|
'qipai_tenants'
|
||||||
];
|
];
|
||||||
|
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
|
||||||
|
|
||||||
async function readCoreTables(pool) {
|
async function readCoreTables(pool) {
|
||||||
const placeholders = expectedTables.map(() => '?').join(', ');
|
const placeholders = expectedTables.map(() => '?').join(', ');
|
||||||
@@ -42,6 +48,37 @@ async function readMigrationVersion(pool) {
|
|||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function loadLegacyFixture(pool) {
|
||||||
|
const fixtureSql = await readFile(
|
||||||
|
resolve(repoRoot, 'database/fixtures/2026061801_m01b_legacy_schema.sql'),
|
||||||
|
'utf8'
|
||||||
|
);
|
||||||
|
const statements = splitSqlStatements(fixtureSql);
|
||||||
|
for (const statement of statements) {
|
||||||
|
await pool.query(statement);
|
||||||
|
}
|
||||||
|
return statements.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function assertLegacyCompatibility(pool) {
|
||||||
|
const repository = new LegacyReadRepository(pool);
|
||||||
|
const stores = await repository.listStores({ tenantId: 1 });
|
||||||
|
const rooms = await repository.listRooms({ tenantId: 1, parentId: 101 });
|
||||||
|
const orders = await repository.listOrders({ tenantId: 1, parentId: 1001 });
|
||||||
|
const devices = await repository.listDevices({ tenantId: 1, parentId: 1001 });
|
||||||
|
|
||||||
|
assert.deepEqual(stores.map((record) => record.legacyId), [101]);
|
||||||
|
assert.deepEqual(rooms.map((record) => record.legacyId), [1001, 1002]);
|
||||||
|
assert.deepEqual(devices.map((record) => record.code), ['SANITIZED-DEVICE-001']);
|
||||||
|
assert.equal(orders.length, 1);
|
||||||
|
assert.equal(orders[0].code, 'LEGACY-SANITIZED-001');
|
||||||
|
assert.equal(orders[0].totalAmountCents, 2580);
|
||||||
|
assert.equal(orders[0].paidAmountCents, 2000);
|
||||||
|
assert.equal(orders[0].renewalAmountCents, 580);
|
||||||
|
assert.equal(orders[0].groupAmountCents, 0);
|
||||||
|
assert.equal(orders[0].refundAmountCents, null);
|
||||||
|
}
|
||||||
|
|
||||||
const config = loadConfig();
|
const config = loadConfig();
|
||||||
assert.equal(config.mysql.passwordConfigured, true, 'Live migration test requires a temporary password.');
|
assert.equal(config.mysql.passwordConfigured, true, 'Live migration test requires a temporary password.');
|
||||||
assert.match(
|
assert.match(
|
||||||
@@ -58,6 +95,10 @@ const plans = {
|
|||||||
const pool = createMySqlPool(config);
|
const pool = createMySqlPool(config);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const legacyFixtureStatements = await loadLegacyFixture(pool);
|
||||||
|
await assertLegacyCompatibility(pool);
|
||||||
|
console.log('PASS: sanitized legacy fixture is readable before migration.');
|
||||||
|
|
||||||
await executeMigrationPlan(pool, plans.up);
|
await executeMigrationPlan(pool, plans.up);
|
||||||
await executeMigrationPlan(pool, plans.verify);
|
await executeMigrationPlan(pool, plans.verify);
|
||||||
assert.deepEqual(await readCoreTables(pool), expectedTables);
|
assert.deepEqual(await readCoreTables(pool), expectedTables);
|
||||||
@@ -65,10 +106,12 @@ try {
|
|||||||
version: '2026061601',
|
version: '2026061601',
|
||||||
name: 'm01b_core_schema'
|
name: 'm01b_core_schema'
|
||||||
}]);
|
}]);
|
||||||
|
await assertLegacyCompatibility(pool);
|
||||||
console.log('PASS: first up and verify completed.');
|
console.log('PASS: first up and verify completed.');
|
||||||
|
|
||||||
await executeMigrationPlan(pool, plans.down);
|
await executeMigrationPlan(pool, plans.down);
|
||||||
assert.deepEqual(await readCoreTables(pool), []);
|
assert.deepEqual(await readCoreTables(pool), []);
|
||||||
|
await assertLegacyCompatibility(pool);
|
||||||
console.log('PASS: down removed all M01-B core tables.');
|
console.log('PASS: down removed all M01-B core tables.');
|
||||||
|
|
||||||
await executeMigrationPlan(pool, plans.up);
|
await executeMigrationPlan(pool, plans.up);
|
||||||
@@ -78,6 +121,7 @@ try {
|
|||||||
version: '2026061601',
|
version: '2026061601',
|
||||||
name: 'm01b_core_schema'
|
name: 'm01b_core_schema'
|
||||||
}]);
|
}]);
|
||||||
|
await assertLegacyCompatibility(pool);
|
||||||
console.log('PASS: second up and verify restored the schema.');
|
console.log('PASS: second up and verify restored the schema.');
|
||||||
|
|
||||||
console.log(JSON.stringify({
|
console.log(JSON.stringify({
|
||||||
@@ -93,7 +137,16 @@ try {
|
|||||||
up: plans.up.statements.length,
|
up: plans.up.statements.length,
|
||||||
verify: plans.verify.statements.length,
|
verify: plans.verify.statements.length,
|
||||||
down: plans.down.statements.length
|
down: plans.down.statements.length
|
||||||
}
|
},
|
||||||
|
legacyFixtureStatements,
|
||||||
|
legacyCompatibilityChecks: [
|
||||||
|
'stores',
|
||||||
|
'rooms',
|
||||||
|
'orders',
|
||||||
|
'devices',
|
||||||
|
'tenant isolation',
|
||||||
|
'decimal cents'
|
||||||
|
]
|
||||||
}, null, 2));
|
}, null, 2));
|
||||||
} finally {
|
} finally {
|
||||||
await closeMySqlPool(pool);
|
await closeMySqlPool(pool);
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
-- M01-B sanitized legacy database fixture.
|
||||||
|
-- All names, identifiers, timestamps, and amounts are synthetic.
|
||||||
|
|
||||||
|
CREATE TABLE member_store_info (
|
||||||
|
id BIGINT UNSIGNED NOT NULL PRIMARY KEY,
|
||||||
|
tenant_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
store_name VARCHAR(128) NOT NULL,
|
||||||
|
status VARCHAR(32) NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
CREATE TABLE member_room_info (
|
||||||
|
id BIGINT UNSIGNED NOT NULL PRIMARY KEY,
|
||||||
|
tenant_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
store_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
room_name VARCHAR(128) NOT NULL,
|
||||||
|
room_no VARCHAR(64) NOT NULL,
|
||||||
|
status VARCHAR(32) NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
CREATE TABLE member_order_info (
|
||||||
|
id BIGINT UNSIGNED NOT NULL PRIMARY KEY,
|
||||||
|
tenant_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
room_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
order_no VARCHAR(64) NOT NULL,
|
||||||
|
status VARCHAR(32) NOT NULL,
|
||||||
|
start_time DATETIME NOT NULL,
|
||||||
|
end_time DATETIME NOT NULL,
|
||||||
|
price DECIMAL(10, 2) NOT NULL,
|
||||||
|
pay_price DECIMAL(10, 2) NULL,
|
||||||
|
renew_price DECIMAL(10, 2) NULL,
|
||||||
|
group_pay_price DECIMAL(10, 2) NULL,
|
||||||
|
refund_price DECIMAL(10, 2) NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
CREATE TABLE member_device_info (
|
||||||
|
id BIGINT UNSIGNED NOT NULL PRIMARY KEY,
|
||||||
|
tenant_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
room_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
device_name VARCHAR(128) NOT NULL,
|
||||||
|
device_id VARCHAR(64) NOT NULL,
|
||||||
|
status VARCHAR(32) NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
INSERT INTO member_store_info (id, tenant_id, store_name, status) VALUES
|
||||||
|
(101, 1, '脱敏一号店', 'OPEN'),
|
||||||
|
(201, 2, '隔离租户门店', 'OPEN');
|
||||||
|
|
||||||
|
INSERT INTO member_room_info (id, tenant_id, store_id, room_name, room_no, status) VALUES
|
||||||
|
(1001, 1, 101, '青竹间', 'A01', 'AVAILABLE'),
|
||||||
|
(1002, 1, 101, '墨玉间', 'A02', 'MAINTENANCE'),
|
||||||
|
(2001, 2, 201, '隔离房间', 'B01', 'AVAILABLE');
|
||||||
|
|
||||||
|
INSERT INTO member_order_info (
|
||||||
|
id, tenant_id, room_id, order_no, status, start_time, end_time,
|
||||||
|
price, pay_price, renew_price, group_pay_price, refund_price
|
||||||
|
) VALUES
|
||||||
|
(
|
||||||
|
5001, 1, 1001, 'LEGACY-SANITIZED-001', 'PAID',
|
||||||
|
'2026-06-18 02:00:00', '2026-06-18 04:30:00',
|
||||||
|
25.80, 20.00, 5.80, 0.00, NULL
|
||||||
|
),
|
||||||
|
(
|
||||||
|
5002, 2, 2001, 'LEGACY-TENANT-ISOLATED', 'PAID',
|
||||||
|
'2026-06-18 03:00:00', '2026-06-18 04:00:00',
|
||||||
|
99.99, 99.99, NULL, NULL, 0.01
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO member_device_info (
|
||||||
|
id, tenant_id, room_id, device_name, device_id, status
|
||||||
|
) VALUES
|
||||||
|
(9001, 1, 1001, '脱敏门禁控制箱', 'SANITIZED-DEVICE-001', 'ONLINE'),
|
||||||
|
(9002, 2, 2001, '隔离租户设备', 'SANITIZED-DEVICE-002', 'OFFLINE');
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# 配置总表
|
# 配置总表
|
||||||
|
|
||||||
> 当前总纲:V5.2.md
|
> 当前总纲:V5.3.md
|
||||||
> 最后更新:2026-06-16
|
> 最后更新:2026-06-18
|
||||||
> 维护规则:任何配置路径、账号、密码、域名、端口或加载顺序变化,必须与 README.md、V5.2.md 和实际配置在同一提交中更新。
|
> 维护规则:任何配置路径、账号、密码、域名、端口或加载顺序变化,必须与 README.md、V5.3.md 和实际配置在同一提交中更新。
|
||||||
|
|
||||||
## 当前已知凭据
|
## 当前已知凭据
|
||||||
|
|
||||||
@@ -24,9 +24,10 @@
|
|||||||
|
|
||||||
## 文件位置
|
## 文件位置
|
||||||
|
|
||||||
完整位置表见根目录 README.md 的“配置文件位置”章节以及 V5.2.md 的“0.6 README、配置文件与明文凭据同步规则”。
|
完整位置表见根目录 README.md 的“配置文件位置”章节以及 V5.3.md 的“0.6 README、配置文件与明文凭据同步规则”。
|
||||||
|
|
||||||
## 变更记录
|
## 变更记录
|
||||||
|
|
||||||
- 2026-06-16:建立 V5.1 配置总表;登记 WSL EMQX Dashboard `admin/admin123`;固定 Windows、WSL 和 Ubuntu 配置路径。
|
- 2026-06-16:建立 V5.1 配置总表;登记 WSL EMQX Dashboard `admin/admin123`;固定 Windows、WSL 和 Ubuntu 配置路径。
|
||||||
- 2026-06-16:升级 V5.2;配置位置不变,增加 README/总纲工程优先一致性要求。
|
|
||||||
|
- 2026-06-18:总纲升级为 V5.3;配置值未变,新增持续开发执行游标与固定模块推进规则。
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
# 当前开发成果基线
|
# 当前开发成果基线
|
||||||
|
|
||||||
> V5.0 首次核验日期:2026-06-16
|
> V5.0 首次核验日期:2026-06-16
|
||||||
> audited_commit: `8749a44`
|
> audited_commit: `1192dcb`
|
||||||
> next_engineering_target: M01-B 建立脱敏旧库结构 fixture,在旧库副本上执行迁移并验证兼容读取
|
> next_engineering_target: M01-C 建立 MySQL outbox、任务表和 PM2 worker 的轻量异步任务基础
|
||||||
> 事实源:当前工作区、Git 历史、状态文档、Windows/WSL 检查脚本。
|
> 事实源:当前工作区、Git 历史、状态文档、Windows/WSL 检查脚本。
|
||||||
|
|
||||||
## 总体结论
|
## 总体结论
|
||||||
|
|
||||||
| 范围 | 当前状态 | 证据 | 结论 |
|
| 范围 | 当前状态 | 证据 | 结论 |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| 总纲版本 | V5.2 已成为当前权威总纲,V5.1/V5.0/V4.8 已保留为历史备份 | 根目录存在 `V5.2.md`、`V5.1.md`、`V5.0.md` 和 `V4.8.md` | 可继续按 V5.2 开发 |
|
| 总纲版本 | V5.3 已成为当前权威总纲,V5.2/V5.1/V5.0/V4.8 已保留为历史备份 | 根目录存在 `V5.3.md`、`V5.2.md`、`V5.1.md`、`V5.0.md` 和 `V4.8.md` | 可继续按 V5.3 的执行游标开发 |
|
||||||
| Git 远端 | `origin=ssh://git@git.txyundm.cn:2222/panda/qipai.git`,分支 `main` | `git rev-list main...origin/main` 为 `0 0` | 本地与远端同步 |
|
| Git 远端 | `origin=ssh://git@git.txyundm.cn:2222/panda/qipai.git`,分支 `main` | `git rev-list main...origin/main` 为 `0 0` | 本地与远端同步 |
|
||||||
| 正式后端 | 已新增 Fastify 5 + TypeScript 最小骨架、健康/就绪/版本路由、配置模板、依赖锁文件、契约测试、TypeScript 编译、真实 HTTP 健康检查、MySQL 连接池、迁移 CLI、旧表只读兼容 Repository、旧订单金额严格转换和真实 MySQL 空库往返测试 | `backend/package.json`、`backend/package-lock.json`、`backend/src/**`、`backend/tests/**`、`scripts/dev/windows/check-backend.ps1`、`scripts/dev/wsl/mysql-migration-roundtrip.sh` | M01-B PARTIAL;MySQL 8.4.9 空库已通过 `up/verify/down/up/verify`,异常退出后临时库与账号清理通过;旧库副本迁移、鉴权和业务接口未完成 |
|
| 正式后端 | 已新增 Fastify 5 + TypeScript 最小骨架、健康/就绪/版本路由、配置模板、依赖锁文件、契约测试、TypeScript 编译、真实 HTTP 健康检查、MySQL 连接池、迁移 CLI、旧表只读兼容 Repository、旧订单金额严格转换,以及真实 MySQL 空库和脱敏旧库副本往返测试 | `backend/package.json`、`backend/package-lock.json`、`backend/src/**`、`backend/tests/**`、`database/fixtures/**`、`scripts/dev/windows/check-backend.ps1`、`scripts/dev/wsl/mysql-migration-roundtrip.sh` | M01-B DONE;MySQL 8.4.9 已验证脱敏旧表在迁移前、up/verify 后、down 后和再次 up/verify 后均可兼容读取;下一阶段为 M01-C |
|
||||||
| 后台管理端 | 仅有 `admin/.gitkeep` | 当前文件扫描 | M09 未开始,不能标记 DONE |
|
| 后台管理端 | 仅有 `admin/.gitkeep` | 当前文件扫描 | M09 未开始,不能标记 DONE |
|
||||||
| 微信小程序 | 仅有 `miniapp/.gitkeep` | 当前文件扫描 | M08 未开始,不能标记 DONE |
|
| 微信小程序 | 仅有 `miniapp/.gitkeep` | 当前文件扫描 | M08 未开始,不能标记 DONE |
|
||||||
| 数据库迁移 | 已新增 M01-B 核心 schema up/down/verify SQL、最小脱敏 seed、迁移计划/执行 CLI、验证结果数量门禁和 MySQL 8 空库集成测试 | `database/migrations/2026061601_m01b_core_schema.*.sql`、`database/seeds/2026061601_m01b_minimal_seed.sql`、`backend/src/db/migration-runner.ts`、`backend/tests/mysql-migration-roundtrip.test.mjs` | PARTIAL;WSL MySQL 8.4.9 已验证 11 条 up、3 条 verify、10 条 down 及再次 up/verify,临时资源最终为 0;旧库副本与真实旧数据迁移尚未验证 |
|
| 数据库迁移 | 已新增 M01-B 核心 schema up/down/verify SQL、最小脱敏 seed、旧库结构 fixture、迁移计划/执行 CLI、验证结果数量门禁和 MySQL 8 集成测试 | `database/migrations/2026061601_m01b_core_schema.*.sql`、`database/seeds/2026061601_m01b_minimal_seed.sql`、`database/fixtures/2026061801_m01b_legacy_schema.sql`、`backend/src/db/migration-runner.ts`、`backend/tests/mysql-migration-roundtrip.test.mjs` | M01-B DONE;WSL MySQL 8.4.9 已验证 8 条旧库 fixture、11 条 up、3 条 verify、10 条 down,并验证租户隔离和旧金额整数分转换;不导入真实旧数据 |
|
||||||
| M00 部署脚本 | 已有菜单、状态、HTTPS、Certbot、EMQX、备份检查模板 | `setup.sh`、`scripts/setup/`、`deploy/` | PARTIAL,生产未执行 |
|
| M00 部署脚本 | 已有菜单、状态、HTTPS、Certbot、EMQX、备份检查模板 | `setup.sh`、`scripts/setup/`、`deploy/` | PARTIAL,生产未执行 |
|
||||||
| 发布清单 dry-run | 可基于当前 HEAD 输出 `deployed=false` 的 release manifest,记录后端/后台/迁移尚未生成而跳过 | `scripts/setup/deploy-business.sh --dry-run .`、`scripts/dev/windows/check-release-manifest.ps1` | 可在 M00 验证结构;真实构建与生产发布待 M01/M09 后接入 |
|
| 发布清单 dry-run | 可基于当前 HEAD 输出 `deployed=false` 的 release manifest,记录后端/后台/迁移尚未生成而跳过 | `scripts/setup/deploy-business.sh --dry-run .`、`scripts/dev/windows/check-release-manifest.ps1` | 可在 M00 验证结构;真实构建与生产发布待 M01/M09 后接入 |
|
||||||
| 参考资料 | 已有清单、脱敏日志、页面/接口/表结构摘要 | `docs/reference-*`、`docs/db-schema-inventory.md` | PARTIAL,仍需按模块迁移正式实现 |
|
| 参考资料 | 已有清单、脱敏日志、页面/接口/表结构摘要 | `docs/reference-*`、`docs/db-schema-inventory.md` | PARTIAL,仍需按模块迁移正式实现 |
|
||||||
@@ -35,6 +35,6 @@
|
|||||||
|
|
||||||
## 下一步
|
## 下一步
|
||||||
|
|
||||||
1. 继续 M01-B:建立不含真实数据的旧表结构与边界数据 fixture,在旧库副本上执行核心迁移和兼容读取验证。
|
1. 进入 M01-C:建立 MySQL outbox、任务表、幂等领取和失败重试基础,并接入独立 PM2 worker 入口。
|
||||||
2. 评估 Kysely 安全修复版的 Node 22 要求;未升级生产运行时前继续使用 `mysql2/promise`。
|
2. 评估 Kysely 安全修复版的 Node 22 要求;未升级生产运行时前继续使用 `mysql2/promise`。
|
||||||
3. 保持 Windows 常规门禁不依赖本机 MySQL;真实迁移测试固定在 WSL 原生临时副本执行。
|
3. 保持 Windows 常规门禁不依赖本机 MySQL;真实迁移测试固定在 WSL 原生临时副本执行。
|
||||||
|
|||||||
@@ -42,3 +42,12 @@ powershell -ExecutionPolicy Bypass -File scripts/dev/windows/check-backend.ps1
|
|||||||
- 清理:随机临时数据库与最小权限临时账号在正常和模拟异常退出后均删除,残留计数为 `0/0`。
|
- 清理:随机临时数据库与最小权限临时账号在正常和模拟异常退出后均删除,残留计数为 `0/0`。
|
||||||
- 入口:在 WSL 原生测试副本执行 `bash scripts/dev/wsl/mysql-migration-roundtrip.sh`。
|
- 入口:在 WSL 原生测试副本执行 `bash scripts/dev/wsl/mysql-migration-roundtrip.sh`。
|
||||||
- 部署影响:无;未连接生产数据库,未修改部署菜单和正式 schema。
|
- 部署影响:无;未连接生产数据库,未修改部署菜单和正式 schema。
|
||||||
|
|
||||||
|
## 2026-06-18 脱敏旧库副本验证
|
||||||
|
|
||||||
|
- 新增 `database/fixtures/2026061801_m01b_legacy_schema.sql`,仅包含虚构门店、房间、订单和设备结构及边界数据。
|
||||||
|
- 在 WSL MySQL 8.4.9 临时库中先载入 8 条 fixture 语句,再执行 `up → verify → down → up → verify`。
|
||||||
|
- 旧表在迁移前、首次迁移后、down 后和再次迁移后均可通过只读 Repository 查询。
|
||||||
|
- 已验证 `tenant_id` 与父级过滤不会读取另一租户数据,订单金额 `25.80/20.00/5.80/0.00/NULL` 分别转换为 `2580/2000/580/0/null`。
|
||||||
|
- down 只删除新 `qipai_*` 表,不删除或改写旧表;未导入任何真实旧数据。
|
||||||
|
- 部署影响:无;仅增加开发测试 fixture 和集成测试,正式迁移 SQL 未变化。
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
| Gitea 仓库 SSH | ssh://git@git.txyundm.cn:2222/panda/qipai.git |
|
| Gitea 仓库 SSH | ssh://git@git.txyundm.cn:2222/panda/qipai.git |
|
||||||
| 生产拉取仓库 | ssh://git@127.0.0.1:2222/panda/qipai.git |
|
| 生产拉取仓库 | ssh://git@127.0.0.1:2222/panda/qipai.git |
|
||||||
| 默认分支 | main |
|
| 默认分支 | main |
|
||||||
| 最近模块 push commit | `3add64b`(M01-B 核心迁移与 MySQL 连接池秘密扫描修复) |
|
| 最近模块 push commit | `1192dcb`(M01-B 脱敏旧库副本迁移与兼容读取) |
|
||||||
| 最近 push 远端校验 | 工程提交已生成;远端一致性在本轮最终推送后复核 |
|
| 最近 push 远端校验 | 本轮最终推送后已复核 `HEAD == origin/main` |
|
||||||
| 目标系统 | Ubuntu 24.04 |
|
| 目标系统 | Ubuntu 24.04 |
|
||||||
| 内核架构 | x86_64 |
|
| 内核架构 | x86_64 |
|
||||||
| DPKG 架构 | amd64 |
|
| DPKG 架构 | amd64 |
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
| WSL 环境验证 | 已完成轻量检查、shell 语法检查、临时副本准备和清理;本地 MQTT 服务级核验通过;V5.0 点名的 WSL EMQX 检查/启动/停止入口已补齐;完整构建待正式项目生成 |
|
| WSL 环境验证 | 已完成轻量检查、shell 语法检查、临时副本准备和清理;本地 MQTT 服务级核验通过;V5.0 点名的 WSL EMQX 检查/启动/停止入口已补齐;完整构建待正式项目生成 |
|
||||||
| 最近环境快检 | 2026-06-16 WSL 本地 MQTT 服务级核验通过;EMQX 5.8.9 active/enabled,MQTTX CLI 1.13.0,五端口监听;认证/ACL/TLS/协议仍未验收 |
|
| 最近环境快检 | 2026-06-16 WSL 本地 MQTT 服务级核验通过;EMQX 5.8.9 active/enabled,MQTTX CLI 1.13.0,五端口监听;认证/ACL/TLS/协议仍未验收 |
|
||||||
| 最近部署后复检 | 未执行 |
|
| 最近部署后复检 | 未执行 |
|
||||||
| 最近验证 commit | `3add64b`;后端 API TypeScript 编译、生产依赖审计、本地真实 HTTP 健康检查、迁移契约、MySQL 连接池契约和秘密扫描已通过 |
|
| 最近验证 commit | `1192dcb`;Windows 后端全量门禁与 WSL MySQL 8.4.9 空库/脱敏旧库副本往返测试已通过 |
|
||||||
| 最近验证日期 | 2026-06-16 |
|
| 最近验证日期 | 2026-06-18 |
|
||||||
| 已验证系统 | Ubuntu 24.04 / 未验证 |
|
| 已验证系统 | Ubuntu 24.04 / 未验证 |
|
||||||
| 菜单 1 首次安装 | 脚本已实现目录布局;未在生产 Ubuntu 执行 |
|
| 菜单 1 首次安装 | 脚本已实现目录布局;未在生产 Ubuntu 执行 |
|
||||||
| 菜单 2 更新业务 | 脚本已实现仓库检查、生产 release manifest 写入和本地 dry-run manifest 输出;后端项目已可本地构建并通过 HTTP 健康检查;迁移文件存在时 dry-run 记录 `PROJECT_PRESENT_MIGRATION_NOT_RUN`;未在生产 Ubuntu 执行 |
|
| 菜单 2 更新业务 | 脚本已实现仓库检查、生产 release manifest 写入和本地 dry-run manifest 输出;后端项目已可本地构建并通过 HTTP 健康检查;迁移文件存在时 dry-run 记录 `PROJECT_PRESENT_MIGRATION_NOT_RUN`;未在生产 Ubuntu 执行 |
|
||||||
|
|||||||
@@ -124,3 +124,19 @@ release manifest dry-run 已能记录 `databaseMigration=PROJECT_PRESENT_MIGRATI
|
|||||||
- 部署影响:无;未连接生产数据库,未修改部署菜单和正式迁移文件。
|
- 部署影响:无;未连接生产数据库,未修改部署菜单和正式迁移文件。
|
||||||
- M01-B 保持 `PARTIAL`:尚未在脱敏旧库副本上执行迁移和兼容读取,鉴权与业务接口也未完成。
|
- M01-B 保持 `PARTIAL`:尚未在脱敏旧库副本上执行迁移和兼容读取,鉴权与业务接口也未完成。
|
||||||
- 下一步:建立脱敏旧表结构 fixture,在旧库副本上执行迁移并验证兼容读取。
|
- 下一步:建立脱敏旧表结构 fixture,在旧库副本上执行迁移并验证兼容读取。
|
||||||
|
|
||||||
|
## 15. 2026-06-18 续开发:脱敏旧库副本迁移与兼容读取
|
||||||
|
|
||||||
|
- `ENGINEERING_DELTA=YES`。
|
||||||
|
- 新增脱敏旧库 fixture,覆盖门店、房间、订单、设备和两个租户;全部名称、标识、时间和金额均为虚构数据。
|
||||||
|
- 扩展真实 MySQL 集成测试:迁移前、首次 up/verify 后、down 后、再次 up/verify 后均执行旧表兼容读取。
|
||||||
|
- 验证租户隔离、父级过滤、只读查询、金额整数分转换,以及 down 不删除旧表。
|
||||||
|
- `npm test`(`backend/`):退出码 0。
|
||||||
|
- `powershell -ExecutionPolicy Bypass -File scripts/dev/windows/check-backend.ps1`:退出码 0,编译、契约测试、迁移计划和真实 HTTP 健康检查通过。
|
||||||
|
- `bash scripts/dev/wsl/mysql-migration-roundtrip.sh`:退出码 0;MySQL 8.4.9,fixture 8 条、up 11 条、verify 3 条、down 10 条。
|
||||||
|
- `bash scripts/dev/wsl/mysql-migration-roundtrip.sh --cleanup-probe`:退出码 0,模拟异常退出后临时数据库和账号无残留。
|
||||||
|
- 工程文件:`database/fixtures/2026061801_m01b_legacy_schema.sql`、`backend/tests/mysql-migration-roundtrip.test.mjs`、`backend/tests/migration-contract.test.mjs`。
|
||||||
|
- 工程提交:`1192dcb test(M01-B): 验证脱敏旧库迁移兼容`。
|
||||||
|
- 数据库/API/部署变化:生产数据库无变化,API 无变化,部署影响无;正式迁移 SQL 未修改。
|
||||||
|
- M01-B 完成;鉴权属于 M02,业务接口属于后续业务模块,不再作为 M01-B 阻塞项。
|
||||||
|
- 下一步:M01-C 轻量异步任务基础。
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
| REF-001 | 参考资料完整纳管 | M00-A | PARTIAL | `7bb4338` | 已生成哈希清单、脱敏日志、页面地图、接口线索和旧数据库结构清单;含秘密/依赖/真实数据风险的原始包和 SQL 已移出 Git 跟踪;仓库完整性门禁已覆盖意外 untracked、嵌套 Git 和 forbidden tracked 文件。 | 后续仍需按模块生成正式源码/迁移,旧 xjar 需大文件策略。 | 进入 M00-B/M00-C 前继续保持原包忽略和摘要可追溯。 |
|
| REF-001 | 参考资料完整纳管 | M00-A | PARTIAL | `7bb4338` | 已生成哈希清单、脱敏日志、页面地图、接口线索和旧数据库结构清单;含秘密/依赖/真实数据风险的原始包和 SQL 已移出 Git 跟踪;仓库完整性门禁已覆盖意外 untracked、嵌套 Git 和 forbidden tracked 文件。 | 后续仍需按模块生成正式源码/迁移,旧 xjar 需大文件策略。 | 进入 M00-B/M00-C 前继续保持原包忽略和摘要可追溯。 |
|
||||||
| SCM-001 | 模块完成即完整推送 | M00-B/M00-C | PARTIAL | `ef0edda` | 首次 main push 成功,`HEAD == origin/main` 校验通过;推送脚本已生成;仓库完整性脚本已升级为提交前门禁并接入 `test-all.ps1`;`push-module.ps1` 已改为先暂存显式路径再运行门禁;状态文档枚举和临时占位检查已接入。 | 后续模块仍需逐次执行并记录。 | 继续在每轮提交前执行完整性、敏感信息、大文件、状态文档和远端一致性检查。 |
|
| SCM-001 | 模块完成即完整推送 | M00-B/M00-C | PARTIAL | `ef0edda` | 首次 main push 成功,`HEAD == origin/main` 校验通过;推送脚本已生成;仓库完整性脚本已升级为提交前门禁并接入 `test-all.ps1`;`push-module.ps1` 已改为先暂存显式路径再运行门禁;状态文档枚举和临时占位检查已接入。 | 后续模块仍需逐次执行并记录。 | 继续在每轮提交前执行完整性、敏感信息、大文件、状态文档和远端一致性检查。 |
|
||||||
| WSL-001 | WSL 隔离辅助验证 | M00-C | PARTIAL | `a690e85` | WSL 基础脚本已执行通过;本地 MQTT 服务级核验通过;认证/ACL 冒烟脚本入口、配置自检、可选 TLS/遗嘱/重复消息探测入口已生成;V5.0 点名的 WSL EMQX 检查/启动/停止入口已补齐。 | 正式后端/后台尚未生成,无法执行完整 Linux 构建;MQTT 本地账号未配置,认证/ACL/TLS/遗嘱/幂等未验收;生产 EMQX 不由 WSL 脚本管理。 | M01/M09 生成项目后在 WSL 原生临时副本执行完整构建;配置本地 MQTT 最小权限账号后执行冒烟和可选探测。 |
|
| WSL-001 | WSL 隔离辅助验证 | M00-C | PARTIAL | `a690e85` | WSL 基础脚本已执行通过;本地 MQTT 服务级核验通过;认证/ACL 冒烟脚本入口、配置自检、可选 TLS/遗嘱/重复消息探测入口已生成;V5.0 点名的 WSL EMQX 检查/启动/停止入口已补齐。 | 正式后端/后台尚未生成,无法执行完整 Linux 构建;MQTT 本地账号未配置,认证/ACL/TLS/遗嘱/幂等未验收;生产 EMQX 不由 WSL 脚本管理。 | M01/M09 生成项目后在 WSL 原生临时副本执行完整构建;配置本地 MQTT 最小权限账号后执行冒烟和可选探测。 |
|
||||||
| API-001 | 固定 HTTPS API 域名 | M00-E/M01/M08/M10 | PARTIAL | `8749a44` | 已新增 Windows 检查脚本、Ubuntu 菜单检查和固定域名 Nginx 模板;M01-A 健康接口、编译和本地 HTTP 检查通过;M01-B 的连接池、迁移 CLI、旧表兼容读取、整数分转换已通过契约测试,并在 WSL MySQL 8.4.9 空库完成 `up/verify/down/up/verify`,异常退出清理后临时库与账号均为 0。 | DNS/HTTPS 生产验证、Ubuntu 24.04 生产运行时、旧库副本迁移、业务接口和鉴权未验收。 | 继续 M01-B 脱敏旧库结构副本迁移与兼容读取;后续在 M10 接入生产域名、证书和 Nginx 真实验收。 |
|
| API-001 | 固定 HTTPS API 域名 | M00-E/M01/M08/M10 | PARTIAL | `1192dcb` | 已新增 Windows 检查脚本、Ubuntu 菜单检查和固定域名 Nginx 模板;M01-A 健康接口、编译和本地 HTTP 检查通过;M01-B 的连接池、迁移 CLI、旧表兼容读取、整数分转换已通过契约测试,并在 WSL MySQL 8.4.9 的空库和脱敏旧库副本完成 `up/verify/down/up/verify`,异常退出清理后临时库与账号均为 0。 | DNS/HTTPS 生产验证、Ubuntu 24.04 生产运行时、业务接口和鉴权未验收。 | 进入 M01-C 轻量异步任务基础;后续在 M10 接入生产域名、证书和 Nginx 真实验收。 |
|
||||||
| TLS-001 | Nginx 与证书自动化 | M00-E/M10 | PARTIAL | `4cb3ab6` | 已生成 Nginx 模板、Certbot 命令说明和菜单第 4 项检查,可检查模板、站点启用、TLS、健康端点、证书文件、续期配置和 `certbot.timer`。 | 证书申请/续期 dry-run、80/443 生产验证未执行。 | 在生产 Ubuntu 执行证书签发、续期 dry-run 和 Nginx 安装记录。 |
|
| TLS-001 | Nginx 与证书自动化 | M00-E/M10 | PARTIAL | `4cb3ab6` | 已生成 Nginx 模板、Certbot 命令说明和菜单第 4 项检查,可检查模板、站点启用、TLS、健康端点、证书文件、续期配置和 `certbot.timer`。 | 证书申请/续期 dry-run、80/443 生产验证未执行。 | 在生产 Ubuntu 执行证书签发、续期 dry-run 和 Nginx 安装记录。 |
|
||||||
| WXNET-001 | 微信合法域名与真机验证 | M00-E/M08/M10 | TODO | - | 已补 API 域名报告入口,但未做微信后台或真机验证。 | 微信后台/真机未验证。 | 后续导入小程序后执行合法域名和真机验证。 |
|
| WXNET-001 | 微信合法域名与真机验证 | M00-E/M08/M10 | TODO | - | 已补 API 域名报告入口,但未做微信后台或真机验证。 | 微信后台/真机未验证。 | 后续导入小程序后执行合法域名和真机验证。 |
|
||||||
| OPS-001 | 固定 `/opt/apps` 目录 | M00-D/M10 | PARTIAL | `292ab7f` | `scripts/setup/init-layout.sh` 已生成目录布局、uploads 目录和 manifest;WSL 检查脚本通过,未在生产 Ubuntu 执行。 | 生产操作未执行。 | 由管理员在 Ubuntu 菜单执行并记录结果。 |
|
| OPS-001 | 固定 `/opt/apps` 目录 | M00-D/M10 | PARTIAL | `292ab7f` | `scripts/setup/init-layout.sh` 已生成目录布局、uploads 目录和 manifest;WSL 检查脚本通过,未在生产 Ubuntu 执行。 | 生产操作未执行。 | 由管理员在 Ubuntu 菜单执行并记录结果。 |
|
||||||
|
|||||||
+12
-1
@@ -1,9 +1,20 @@
|
|||||||
# 模块状态
|
# 模块状态
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
execution_cursor:
|
||||||
|
current_module: M01
|
||||||
|
current_stage: M01-C
|
||||||
|
last_completed_stage: M01-B
|
||||||
|
next_stage: M01-C
|
||||||
|
last_engineering_commit: 1192dcb
|
||||||
|
last_push_verified: true
|
||||||
|
blocked_reason: ""
|
||||||
|
```
|
||||||
|
|
||||||
| 模块 | 状态 | 最近提交 | 最近开发日志 | 备注 |
|
| 模块 | 状态 | 最近提交 | 最近开发日志 | 备注 |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| M00 单仓库与服务器基础骨架 | PARTIAL | `ef0edda` | docs/devlogs/2026-06-16-M00-V5-基线核验.md | V5.2 已接入;已有成果基线、仓库完整性门禁、状态文档门禁、显式路径模块推送脚本、release manifest dry-run 检查、WSL 本地 MQTT 服务级核验、认证/ACL 冒烟入口、配置自检、可选 TLS/遗嘱/重复消息探测入口和 WSL EMQX 检查/启动/停止入口已补;生产部署、账号配置、真实验收仍未完成。 |
|
| M00 单仓库与服务器基础骨架 | PARTIAL | `ef0edda` | docs/devlogs/2026-06-16-M00-V5-基线核验.md | V5.2 已接入;已有成果基线、仓库完整性门禁、状态文档门禁、显式路径模块推送脚本、release manifest dry-run 检查、WSL 本地 MQTT 服务级核验、认证/ACL 冒烟入口、配置自检、可选 TLS/遗嘱/重复消息探测入口和 WSL EMQX 检查/启动/停止入口已补;生产部署、账号配置、真实验收仍未完成。 |
|
||||||
| M01 后端 API 基础工程 | PARTIAL | `8749a44` | docs/devlogs/2026-06-16-M01-B-数据库迁移与兼容层.md | M01-A Fastify 5 + TypeScript 后端骨架、依赖锁定、编译和真实 HTTP 健康检查已通过;M01-B 已新增核心 schema、迁移 CLI、旧表只读兼容 Repository、订单金额严格转换,以及 WSL MySQL 8.4.9 空库 `up/verify/down/up/verify` 集成测试和异常清理门禁。旧库副本迁移、鉴权和业务接口仍未完成。 |
|
| M01 后端 API 基础工程 | PARTIAL | `1192dcb` | docs/devlogs/2026-06-16-M01-B-数据库迁移与兼容层.md | M01-A 已完成后端骨架;M01-B 已完成核心 schema、迁移 CLI、旧表只读兼容、金额严格转换,以及 WSL MySQL 8.4.9 空库和脱敏旧库副本往返验证。当前进入 M01-C 轻量异步任务基础。 |
|
||||||
| M02 登录、租户、权限 | TODO | - | - | - |
|
| M02 登录、租户、权限 | TODO | - | - | - |
|
||||||
| M03 门店、房间、价格、营业时间 | TODO | - | - | - |
|
| M03 门店、房间、价格、营业时间 | TODO | - | - | - |
|
||||||
| M04 订单、时段锁定、支付闭环 | TODO | - | - | - |
|
| M04 订单、时段锁定、支付闭环 | TODO | - | - | - |
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop"
|
|||||||
$readmePath = "README.md"
|
$readmePath = "README.md"
|
||||||
$configPath = "docs/configuration.md"
|
$configPath = "docs/configuration.md"
|
||||||
$baselinePath = "docs/current-baseline.md"
|
$baselinePath = "docs/current-baseline.md"
|
||||||
$expectedSpec = "V5.2.md"
|
$expectedSpec = "V5.3.md"
|
||||||
$expectedOrigin = "ssh://git@git.txyundm.cn:2222/panda/qipai.git"
|
$expectedOrigin = "ssh://git@git.txyundm.cn:2222/panda/qipai.git"
|
||||||
|
|
||||||
foreach ($path in @($readmePath, $configPath, $baselinePath, $expectedSpec)) {
|
foreach ($path in @($readmePath, $configPath, $baselinePath, $expectedSpec)) {
|
||||||
@@ -28,7 +28,7 @@ $nextEngineeringLabel = [regex]::Unescape("\u4e0b\u4e00\u5de5\u7a0b\u76ee\u6807"
|
|||||||
$pendingWord = [regex]::Unescape("\u5f85")
|
$pendingWord = [regex]::Unescape("\u5f85")
|
||||||
|
|
||||||
$requiredSharedValues = @(
|
$requiredSharedValues = @(
|
||||||
"V5.2.md",
|
"V5.3.md",
|
||||||
"D:\qipai",
|
"D:\qipai",
|
||||||
"/mnt/d/qipai",
|
"/mnt/d/qipai",
|
||||||
$expectedOrigin,
|
$expectedOrigin,
|
||||||
@@ -48,11 +48,11 @@ foreach ($value in $requiredSharedValues) {
|
|||||||
throw "README missing required value: $value"
|
throw "README missing required value: $value"
|
||||||
}
|
}
|
||||||
if (-not $spec.Contains($value)) {
|
if (-not $spec.Contains($value)) {
|
||||||
throw "V5.2 missing required value: $value"
|
throw "V5.3 missing required value: $value"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($value in @("V5.2.md", $expectedOrigin, "admin123", "101.42.38.246:1883")) {
|
foreach ($value in @("V5.3.md", $expectedOrigin, "admin123", "101.42.38.246:1883")) {
|
||||||
if (-not $config.Contains($value)) {
|
if (-not $config.Contains($value)) {
|
||||||
throw "configuration.md missing required value: $value"
|
throw "configuration.md missing required value: $value"
|
||||||
}
|
}
|
||||||
@@ -98,4 +98,4 @@ if ($baseline -notmatch '(?m)^>\s*next_engineering_target:\s*\S') {
|
|||||||
throw "current-baseline.md must record next_engineering_target"
|
throw "current-baseline.md must record next_engineering_target"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "PASS: README, V5.2 and configuration index are consistent."
|
Write-Host "PASS: README, V5.3 and configuration index are consistent."
|
||||||
|
|||||||
Reference in New Issue
Block a user