feat(backend): heartbeat v2 sends the module catalogue; license e2e on v2
Platform v2 step 1.7, site side (APPS_PLATFORM D-20, D-21; contract C-1 v2).
- cloud_sync heartbeat body is {version, local_ip, module_catalog}; the
catalogue (key, kind, name, depends, limits) comes from the manifests and
drives the sysadmin module editor
- license_e2e.py runs against the v2 cloud: free-tier checks use an ordering
endpoint (the catalogue stays available), new section 8 edits the site's
modules in the cloud and checks kds becomes module.not_licensed and
reports.history_days = 30 after the next heartbeat (25/25 pass)
- e2e seed templates made by v1 code (no alembic_version) are detected and
reseeded automatically (license_e2e.py and lib/proc.mjs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,11 @@ export async function waitHttp(url, up = true, timeoutMs = 60_000) {
|
||||
*/
|
||||
export function seededDataDir(label = 'data') {
|
||||
const template = path.join(OUT, 'seed.db')
|
||||
// A template seeded by v1 code has no alembic_version: v2 refuses it (CS-1), so reseed
|
||||
if (existsSync(template)) {
|
||||
const v2 = execFileSync(PYTHON, ['-c', 'import sqlite3, sys; print(sqlite3.connect(sys.argv[1]).execute("select count(*) from sqlite_master where name=?", ("alembic_version",)).fetchone()[0])', template], { encoding: 'utf8' })
|
||||
if (!Number(v2)) { console.log(' seed.db was made by v1 code - reseeding'); rmSync(template, { force: true }) }
|
||||
}
|
||||
if (!existsSync(template)) {
|
||||
console.log(' seeding a demo database (once)…')
|
||||
const partial = `${template}.partial`
|
||||
|
||||
Reference in New Issue
Block a user