Hasna Service Contract v1#2
Conversation
New open-* repos ship FSL-1.1-Apache-2.0 (competing-use restricted, converts to Apache-2.0 after 2 years); existing repos keep current license; SaaS/platform stays proprietary. Includes canonical FSL text.
…, conformance kit) Adds hasna.service_contract.v1 (name/class/contractVersion/kitVersion/bins/storage) with class rules, the reference storage-mode normalizer extracted from open-mailery (local|cloud only per Amendment A1 PURE REMOTE; remote/hybrid/self_hosted as deprecated cloud aliases), env spec (HASNA_<NAME>_STORAGE_MODE/_DATABASE_URL + aliases), health/ready/version shapes, and a repo self-conformance runner reusing the no-cloud guard. Bumps to 0.3.0.
… conformance tests CONTRACT.md normative spec (docs tiers, PURE REMOTE storage, env spec, health endpoints, bins allowlist, sqlite/secret conventions, repo classes). Root docker-compose.yml self-host artifact and this repo's hasna.contract.json (library). Fixtures + mode/service-contract/conformance test suites; narrows an existing union assertion.
|
Worker review for todos task eef976e6 (2026-07-06): PR #2 is already merged into origin/main via 085e4b7, and PR CI verify passed. Independent/adversarial post-merge review found two residual follow-ups rather than an active merge blocker: (1) CONTRACT.md uses self_hosted for operator Docker/Postgres, which conflicts with current canonical deployment terms where self-hosted means Hasna-owned AWS; tracked as todos task 9a1404df. (2) verify/repo-conformance is not idempotent after ignored dist/ exists; bundled dist scanner declarations trigger no_cloud_guard failures; already tracked as tasks 7e45cbad and 4dc16a85, with fresh repro evidence added to 4dc16a85. Local evidence: bun run verify:release passed once on origin/main 42a1287; then bun test and repo-conformance failed with dist present. No code changes made by this worker. |
Implements the Hasna Service Contract v1 in @hasna/contracts (bump 0.2.2 -> 0.3.0).
Deliverables
local|cloudONLY per Amendment A1 (PURE REMOTE — no sync engine, no cache mode, no hybrid/merge; only sanctioned exception is the todos dual-write SHADOW);remote/hybrid/self_hostedaccepted as deprecated cloud aliases; env specHASNA_<NAME>_STORAGE_MODE+HASNA_<NAME>_DATABASE_URL(+<NAME>_aliases);GET /health -> {status,version,mode},/ready,/version; bins allowlist<name>/<name>-mcp/<name>-serve+ extras; sqlite~/.hasna/<name>/<name>.db; secret refhasna/oss/<name>/database-url; rootdocker-compose.ymlself-host artifact; repo classes library/cli-with-store/service/saas with per-class ship rules.ServiceContractManifestSchema) +src/hasna.contract.schema.jsonJSON Schema (name, class, contractVersion, kitVersion, bins, storage) with class-rule validation. Registered in the schema registry.runRepoConformance()+contracts repo-conformanceCLI: manifest valid, bins allowlist + package.json match, mode-enum compliance, health shape (when serve exists), and no forbidden shared cloud runtimes (reusesscanNoCloudTarget). Dev-dep friendly.normalizeMaileryMode, generalized with env resolution.tests/mode.test.ts,tests/service-contract.test.ts,tests/conformance.test.ts.Verification
bun run verify:releasegreen (typecheck, 83 tests, conformance, build, smoke:dist, pack dry-run). Staged secrets scan clean.