{
  "path": "/tutorials/opencode-compaction-pending-task-constraint-verification",
  "reviewedAt": "2026-10-23",
  "version": "OpenCode1.2.15",
  "status": "actual-native-compaction-partial-contract-drift",
  "sourceURLs": [
    "https://opencode.ai/docs/config/",
    "https://opencode.ai/docs/server/",
    "https://opencode.ai/docs/cli/"
  ],
  "validationScope": "OpenCode1.2.15真实创建会话并执行summarize，出现compaction及summary:true的原生消息，之后可复述两个未完成测试和禁止routes.ts，源码SHA相同。但真实摘要把Do not modify any file yet弱化为Please continue with file updates，待批准边界漂移，因此只算partial，不能认定全部约束保持。",
  "bodySteps": [
    "独立外部练习目录，写compaction.auto:false/prune:true，启用唯一ollama provider并固定模型。",
    "以独立XDG配置/数据/缓存启动opencode serve --hostname127.0.0.1 --port11436，禁默认插件、Claude提示读取、远端模型抓取、LSP下载。",
    "GET /config回读真实解析配置，本次version1.2.15/auto:false/prune:true。",
    "保存原创shipping.ts、shipping.test.ts、routes.ts SHA和真实Node测试：empty-basket、unknown-region均失败。告知仅允许shipping两文件、routes禁止，以及Do not modify any file yet；权限仍deny写入。",
    "调用官方POST /session/:id/summarize，保存HTTPtrue、compaction part、summary:true助手消息以及摘要文本。必须查摘要含义，不能只查字数或200。",
    "压缩后先核对待办、禁止文件和待批准边界。本次前两者可复述、SHA未变，但摘要把待批准弱化成继续修改；因此需要重新附上权威contract.txt并等明确批准。写入被权限deny阻挡，不能用源码未变证明模型记忆全对。"
  ],
  "files": [
    {
      "file": "README.md",
      "bytes": 1083,
      "sha256": "b29d2874397a94bf59a3e5f42d20ba04a522ad004f251689431850582c3fe187"
    },
    {
      "file": "after-answer.json",
      "bytes": 1872,
      "sha256": "eae3768ce6e14dfec0397cd00c2295aa9979a27201cdcc9efae912c8a2157b96"
    },
    {
      "file": "after-approval-question.json",
      "bytes": 1804,
      "sha256": "4027672bcd0042fbb4481cf5a3cb1d04273f5e303e43587bba21cf3234c44a13"
    },
    {
      "file": "after-summary-messages.json",
      "bytes": 6324,
      "sha256": "d63c9a95c35a28b0b611b65911bed2a656c4650e095712e47f019ccb6acd13fa"
    },
    {
      "file": "baseline-tests.json",
      "bytes": 2039,
      "sha256": "46b3c94591d23ea878f8028b43afb5ba4b5b260a05c11eb4d428d1f7f1f3c371"
    },
    {
      "file": "before-summary.json",
      "bytes": 1869,
      "sha256": "843505ac95d0c39de881575300aa2d4ea892311c39dbbbc4af1d2447620129a3"
    },
    {
      "file": "config.json",
      "bytes": 808,
      "sha256": "0cef9f8192d2f981d6e60c1c5c3f3a26d76fd84bb4d50c546a5e0b8355a8c1f9"
    },
    {
      "file": "contract.txt",
      "bytes": 159,
      "sha256": "39215b760fc2f6ff2e6f36b20a4dfca0d165c341c05c0b09d39398ea64792dbc"
    },
    {
      "file": "doc.json",
      "bytes": 131955,
      "sha256": "9c32a920b60e4e680434b8ec6a9990a132c1520a9788a5910eb3af3963221517"
    },
    {
      "file": "global-health.json",
      "bytes": 35,
      "sha256": "4188c1a760cbb4b903318b4c281586e1d442674187ca776f7e13218e368e9e71"
    },
    {
      "file": "in-progress-messages.json",
      "bytes": 9069,
      "sha256": "149f8311a0e6c70695053953b1ee65364f033f5ef1ec67f68df5ea5457154c19"
    },
    {
      "file": "opencode.json",
      "bytes": 723,
      "sha256": "6da3118bb2b164a8b8b4ed415af9ba77138e2b4502dc1aaf66932005a1538402"
    },
    {
      "file": "routes.ts",
      "bytes": 42,
      "sha256": "a8d58c4f74520c01026d347f62e179152843741abd45cd62bcece58806cc0791"
    },
    {
      "file": "session-created.json",
      "bytes": 396,
      "sha256": "7294ac3da28eb23914b1edb7efcbd7902bb52d5523a779a480c55153cda47f00"
    },
    {
      "file": "shipping.test.ts",
      "bytes": 289,
      "sha256": "0b419eb5164d722e483ccb8e6f669152a694aa4406cb02c009ae3f048698ff55"
    },
    {
      "file": "shipping.ts",
      "bytes": 187,
      "sha256": "c69e8b32221ca159e143aeb92527e12d6da7a80aa22e2090d8dcc85e20695b2e"
    },
    {
      "file": "source-sha-after.json",
      "bytes": 260,
      "sha256": "68ae1e51ff022ed5f8fd203523272c93c977b4d3a74b472a9fd1b9dfd03458b9"
    },
    {
      "file": "status-snapshot.json",
      "bytes": 2,
      "sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"
    },
    {
      "file": "summarize-response.json",
      "bytes": 4,
      "sha256": "b5bea41b6c623f7c09f1bf24dcae58ebab3c0cdd90ad966bc43a45b44867e12b"
    }
  ],
  "privateCredentialsPublished": false,
  "commands": [
    "opencode serve --port 11436 --hostname 127.0.0.1",
    "GET http://127.0.0.1:11436/config",
    "POST http://127.0.0.1:11436/session/{id}/summarize"
  ],
  "observations": [
    "原生summarize返回true，并产生compaction part和summary:true消息。",
    "压缩后真实回答仍有empty-basket、unknown-region和禁止routes.ts。",
    "真实摘要把“Do not modify any file yet”改成“Please continue with file updates”，待批准边界漂移。",
    "三个源码SHA保持，但写入权限deny也提供保护；两项原始Node失败测试没有被修复。"
  ],
  "limits": [
    "不能声称所有约束保留；压缩后必须重新核对权威合同并等明确批准。",
    "本次短会话只能证明真实手动compaction和这一项漂移，不代表超长生产会话的保持率。"
  ],
  "tokenbaTestKeyUsed": false,
  "timeoutInferenceUsage": "本地路线；没有使用apizt测试Key。",
  "modelProvenance": "隔离Ollama0.40.9；模型为官方Qwen3:0.6b完整GGUF，经原生ollama create导入为tutorial-qwen3-proof，非完整OCI pull成功。权重SHA256 7f4030143c1c477224c5434f8272c662a8b042079a0a584f0a27a1684fe2e1fa，522640096字节；原生自动识别模板，capabilities tools/thinking/completion。"
}