{
  "schema_version": "1.1",
  "experiment_id": "AIEL-2026-0007",
  "source_type": "current_project_activity",
  "title": {
    "en": "SwitchBot five-minute Raw collection: diagnosing minute-04 gaps and reducing ScriptLock contention",
    "ja": "SwitchBot 5分Raw収集における毎時04分欠測の原因特定とScriptLock競合対策"
  },
  "status": "COMPLETED",
  "timestamps": {
    "created_at": "2026-09-06T18:17:12+09:00",
    "started_at": "2026-09-06T08:46:00+09:00",
    "observed_at": "2026-09-07",
    "completed_at": "2026-09-07",
    "published_at": "2026-09-07T15:02:05+00:00",
    "last_verified": "2026-09-07",
    "updated_at": "2026-09-07T15:02:05+00:00"
  },
  "objective": {
    "summary_en": "Identify the cause of SwitchBot five-minute Raw gaps concentrated near minute 04 of each hour, change the collector so external observation is not blocked by long-held ScriptLock contention, and verify from Raw data that the targeted gap pattern does not recur after the change.",
    "summary_ja": "毎時04分付近に集中するSwitchBot 5分Raw欠測の原因を特定し、長時間保持されるScriptLock競合によって外部観測が阻害されないcollectorへ変更したうえで、修正後Rawから対象欠測パターンが再発しないことを検証する。",
    "success_criteria": [
      {
        "id": "SC-001",
        "description_en": "Establish the pre-change control-flow mechanism by which ScriptLock contention can end an invocation before a SwitchBot API observation is recorded.",
        "description_ja": "ScriptLock競合によってSwitchBot API観測記録前に実行が終了し得る修正前制御フローを確認する。"
      },
      {
        "id": "SC-002",
        "description_en": "Move SwitchBot API acquisition outside the lock, timestamp the observation at API acquisition, and reduce locking to the short persistence section; remove the gas-side whole-process lock for the same shared-project contention path.",
        "description_ja": "SwitchBot API取得をLock外へ移し、API取得時点を観測Timestampとし、Lockを短時間の保存部分だけに縮小する。共有プロジェクト内競合を減らすためガス側も処理全体のLockを廃止し書込み部分だけに縮小する。"
      },
      {
        "id": "SC-003",
        "description_en": "Post-change Raw validation shows complete expected five-minute coverage for the retained validation window, complete minute-04 coverage, no delayed-save or post-gap-observation markers, no gap longer than seven minutes, and no recurring duplicate pattern.",
        "description_ja": "修正後Rawの検証期間で期待5分周期が全件取得され、毎時04分取得も全件成功し、遅延保存・欠測後観測・7分超間隔がなく、重複も再発傾向を示さないことを確認する。"
      }
    ]
  },
  "scope": {
    "included": [
      "Google Apps Script project used for SwitchBot five-minute Raw collection",
      "SwitchBotPower.gs acquisition and persistence flow",
      "GasDailyRefresh.gs lock scope insofar as it contributes to shared ScriptLock contention",
      "ScriptLock placement and timeout behavior",
      "API acquisition timestamp versus persistence timing",
      "private Google Sheets five-minute Raw used for post-change completeness verification",
      "minute-04 acquisition completeness",
      "missing slots, duplicate observations, delayed-save markers, post-gap-observation markers, and abnormal observation intervals"
    ],
    "excluded": [
      "Claiming that every historical five-minute gap had the same cause",
      "Generalizing the result to all Google Apps Script projects or all external APIs",
      "Re-designing daily usage-time calculation or treating electricityOfDay as a validated JST daily usage-time source",
      "Publication excludes authentication or authorization secrets, identifying information, private raw observation data, and sensitive internal system or network details that are not needed to understand or reproduce the experiment."
    ],
    "limitations": [
      "The retained evidence establishes the lock-before-observation failure mechanism and a matching pre/post operational pattern, but no per-gap ScriptLock trace was retained for every historical missing slot; attribution of the concentrated minute-04 pattern to ScriptLock contention is therefore an evidence-based causal inference rather than a direct trace for each individual gap.",
      "The post-change validation covers approximately 34 hours; the result establishes effectiveness for the targeted observed failure pattern in that window, not a guarantee against every future collection failure.",
      "One duplicate observation occurred about 38.5 seconds after the preceding observation. It was excluded from accumulation by the existing duplicate defense and did not recur as a pattern.",
      "The separate daily usage-time redesign, including removal of electricityOfDay dependence, is intentionally outside this Experiment."
    ]
  },
  "environment": {
    "hardware": [
      {
        "role": "data_source",
        "manufacturer": "SwitchBot",
        "model": null,
        "revision": null,
        "serial_number_public": false
      }
    ],
    "software": [
      {
        "name": "Google Apps Script",
        "version": null,
        "role": "scheduled five-minute SwitchBot acquisition, persistence, and related gas refresh"
      },
      {
        "name": "Google Sheets",
        "version": null,
        "role": "private five-minute Raw observation store and validation source"
      }
    ],
    "firmware": [],
    "network": {
      "type": "cloud_api_collection",
      "ip_addresses_redacted": true,
      "protocols_observed": [
        "HTTPS"
      ]
    },
    "environmental_conditions": []
  },
  "hypotheses": [
    {
      "id": "H-001",
      "statement_en": "A pre-observation ScriptLock wait can cause a silent five-minute Raw gap when the lock timeout ends the invocation before SwitchBot API acquisition.",
      "statement_ja": "観測前のScriptLock待機は、Lock timeoutによってSwitchBot API取得前に実行が終了する場合、5分Rawの無記録欠測を生じさせ得る。",
      "status": "SUPPORTED",
      "created_at": "2026-09-06T08:46:00+09:00",
      "evidence_refs": [
        "O-001"
      ]
    },
    {
      "id": "H-002",
      "statement_en": "Moving API acquisition before the persistence lock and shortening the shared lock scope will eliminate the recurring minute-04 gap pattern without creating a material duplicate or timing-integrity problem.",
      "statement_ja": "API取得を保存Lockより前へ移し共有Lock範囲を短縮することで、重大な重複・時刻完全性問題を生じさせず毎時04分の反復欠測パターンを解消できる。",
      "status": "SUPPORTED",
      "created_at": "2026-09-06T08:46:00+09:00",
      "evidence_refs": [
        "O-002",
        "O-003",
        "O-005",
        "O-006",
        "O-007"
      ]
    }
  ],
  "procedures": [
    {
      "id": "P-001",
      "sequence": 1,
      "description_en": "Review the pre-change Apps Script control flow and identify how ScriptLock placement can suppress a scheduled observation before the API call.",
      "description_ja": "修正前Apps Script制御フローを確認し、ScriptLock配置がAPI呼出し前に定期観測を抑止し得る経路を特定する。",
      "status": "EXECUTED"
    },
    {
      "id": "P-002",
      "sequence": 2,
      "description_en": "Move SwitchBot API acquisition outside the lock, fix observation time at acquisition, reduce SwitchBot locking to persistence, and reduce the gas-side whole-process lock to the write section.",
      "description_ja": "SwitchBot API取得をLock外へ移し、取得時刻を観測時刻に固定し、SwitchBot側Lockを保存部分だけへ縮小する。ガス側も処理全体Lockを廃止し書込み部分だけへ縮小する。",
      "status": "EXECUTED"
    },
    {
      "id": "P-003",
      "sequence": 3,
      "description_en": "Preserve existing Raw data and continue five-minute collection without rewriting historical Raw rows.",
      "description_ja": "既存Rawを書き換えず、修正後も5分収集を継続する。",
      "status": "EXECUTED"
    },
    {
      "id": "P-004",
      "sequence": 4,
      "description_en": "Evaluate the post-change Raw-only window for minute-04 success, expected five-minute slot coverage, delayed-save/post-gap markers, duplicate intervals, and intervals longer than seven minutes.",
      "description_ja": "修正後Rawだけを用いて、毎時04分取得、期待5分slot、遅延保存・欠測後観測、重複間隔、7分超間隔を評価する。",
      "status": "EXECUTED"
    }
  ],
  "actions": [
    {
      "id": "A-001",
      "type": "code_review",
      "description": {
        "en": "Reviewed the retained collector and identified the lock-before-observation path with a finite timeout and silent early return.",
        "ja": "保持collectorを確認し、有限timeoutと無記録early returnを伴う観測前Lock経路を特定した。"
      },
      "actor": {
        "type": "AI",
        "system": "ChatGPT",
        "role": "analysis"
      },
      "state": "EXECUTED",
      "executed_at": "2026-09-06T08:46:00+09:00",
      "result_refs": [
        "O-001"
      ]
    },
    {
      "id": "A-002",
      "type": "code_change",
      "description": {
        "en": "The operator applied the revised Apps Script implementation used for the subsequent Raw validation.",
        "ja": "操作者が、その後のRaw検証対象となる修正版Apps Script実装を適用した。"
      },
      "actor": {
        "type": "HUMAN",
        "role": "operator"
      },
      "state": "EXECUTED",
      "executed_at": "2026-09-06",
      "result_refs": [
        "O-002",
        "O-003"
      ]
    },
    {
      "id": "A-003",
      "type": "raw_validation",
      "description": {
        "en": "Validated the repaired collector using only retained five-minute Raw observations and abnormal-interval checks.",
        "ja": "保持5分Rawと異常間隔チェックだけを用いて修正版collectorを検証した。"
      },
      "actor": {
        "type": "AI",
        "system": "ChatGPT",
        "role": "analysis"
      },
      "state": "EXECUTED",
      "executed_at": "2026-09-07",
      "result_refs": [
        "O-005",
        "O-006",
        "O-007",
        "O-008"
      ]
    }
  ],
  "observations": [
    {
      "id": "O-001",
      "timestamp": "2026-09-06T08:46:00+09:00",
      "description_en": "The retained pre-change SwitchBotPower logic acquired ScriptLock before API acquisition and could return without writing an observation when the lock was not obtained within 20 seconds.",
      "description_ja": "保持された修正前SwitchBotPowerロジックはAPI取得より先にScriptLockを取得し、20秒以内にLockを取得できない場合は観測を書き込まずreturnし得る構造だった。",
      "observation_type": "source_code_rule_verification",
      "source_type": "retained_project_code",
      "artifact_refs": [],
      "quality": "VALID"
    },
    {
      "id": "O-002",
      "timestamp": "2026-09-06",
      "description_en": "The revised SwitchBot path performs API acquisition before the persistence lock and uses the API acquisition time as the observation timestamp.",
      "description_ja": "修正版SwitchBot経路ではAPI取得を保存Lockより前に実行し、API取得時刻を観測Timestampとして使用する。",
      "observation_type": "source_code_rule_verification",
      "source_type": "retained_project_code",
      "artifact_refs": [],
      "quality": "VALID"
    },
    {
      "id": "O-003",
      "timestamp": "2026-09-06",
      "description_en": "The revised gas-side path no longer holds the shared ScriptLock across the whole refresh operation; locking is limited to the write section.",
      "description_ja": "修正版ガス側経路はrefresh処理全体で共有ScriptLockを保持せず、Lockを書込み部分だけに限定する。",
      "observation_type": "source_code_rule_verification",
      "source_type": "retained_project_code",
      "artifact_refs": [],
      "quality": "VALID"
    },
    {
      "id": "O-004",
      "timestamp": "2026-09-06",
      "description_en": "Existing Raw rows were preserved and the effectiveness check was explicitly limited to Raw rather than daily aggregates.",
      "description_ja": "既存Raw行は保持され、効果判定は日次集計ではなくRawだけに限定された。",
      "observation_type": "procedure_decision",
      "source_type": "operator_instruction_and_retained_activity",
      "artifact_refs": [],
      "quality": "VALID"
    },
    {
      "id": "O-005",
      "timestamp": "2026-09-07",
      "description_en": "In the retained post-change Raw validation window, all 34 expected minute-04 observations were present: 34/34, 100%.",
      "description_ja": "保持された修正後Raw検証期間では、毎時04分の期待観測34件すべてを取得した。34/34、100%。",
      "observation_type": "raw_completeness_analysis",
      "source_type": "private_five_minute_raw",
      "artifact_refs": [],
      "quality": "VALID"
    },
    {
      "id": "O-006",
      "timestamp": "2026-09-07",
      "description_en": "All 411 expected five-minute cycles in the post-change validation window were present: 411/411, with zero missing cycles, zero delayed-save markers, zero post-gap-observation markers, and zero intervals longer than seven minutes.",
      "description_ja": "修正後検証期間の期待5分周期411件は全件存在した。411/411、欠測0、遅延保存0、欠測後観測0、7分超間隔0。",
      "observation_type": "raw_completeness_analysis",
      "source_type": "private_five_minute_raw",
      "artifact_refs": [],
      "quality": "VALID"
    },
    {
      "id": "O-007",
      "timestamp": "2026-09-07",
      "description_en": "One duplicate observation occurred about 38.5 seconds after the preceding observation. Existing duplicate protection excluded it from accumulation, and the abnormal-interval scan found no recurrence pattern.",
      "description_ja": "重複観測は1件だけで、直前観測から約38.5秒後に発生した。既存の重複防御により積算対象外となり、異常間隔横断チェックでも再発傾向は確認されなかった。",
      "observation_type": "duplicate_interval_analysis",
      "source_type": "private_five_minute_raw",
      "artifact_refs": [],
      "quality": "VALID"
    },
    {
      "id": "O-008",
      "timestamp": "2026-09-07",
      "description_en": "The retained Raw validation supports closing the minute-04 missingness issue; the daily usage-time semantics issue remains separate because electricity-accumulation eligibility time is not equivalent to observation coverage or power-on usage time.",
      "description_ja": "保持Raw検証により毎時04分欠測問題はクローズ可能と判断された。一方、電力量積算対象時間は観測カバレッジや電源ON利用時間と同義ではないため、日次利用時間の意味設計は別課題として切り出された。",
      "observation_type": "scope_classification",
      "source_type": "retained_analysis_and_operator_decision",
      "artifact_refs": [],
      "quality": "VALID"
    }
  ],
  "claims": [
    {
      "id": "C-001",
      "statement_en": "The pre-change collector contained a verified control-flow mechanism by which ScriptLock contention could suppress a scheduled SwitchBot observation before API acquisition.",
      "statement_ja": "修正前collectorには、ScriptLock競合によってSwitchBot API取得前に定期観測を抑止し得る制御フローメカニズムが存在した。",
      "evidence_state": "VERIFIED",
      "confidence": "HIGH",
      "evidence_refs": [
        "O-001"
      ],
      "source_refs": []
    },
    {
      "id": "C-002",
      "statement_en": "The concentrated minute-04 missingness was primarily caused by long-held shared ScriptLock contention in the Apps Script project.",
      "statement_ja": "毎時04分付近に集中していた欠測の主要原因は、同一Apps Scriptプロジェクト内で長時間保持されていた共有ScriptLockとの競合だった。",
      "evidence_state": "INFERRED",
      "confidence": "HIGH",
      "evidence_refs": [
        "O-001",
        "O-002",
        "O-003",
        "O-005",
        "O-006"
      ],
      "source_refs": []
    },
    {
      "id": "C-003",
      "statement_en": "The revised implementation separates external observation from persistence locking and shortens the shared lock scope on both the SwitchBot and gas-side paths relevant to this contention scenario.",
      "statement_ja": "修正版実装は外部観測と永続化Lockを分離し、今回の競合に関係するSwitchBot側・ガス側の共有Lock範囲を短縮した。",
      "evidence_state": "VERIFIED",
      "confidence": "HIGH",
      "evidence_refs": [
        "O-002",
        "O-003"
      ],
      "source_refs": []
    },
    {
      "id": "C-004",
      "statement_en": "For the approximately 34-hour retained post-change validation window, the targeted minute-04 gap pattern was eliminated without a material duplicate, delayed-save, post-gap, or long-interval integrity problem.",
      "statement_ja": "保持された約34時間の修正後検証期間では、重大な重複・遅延保存・欠測後観測・長時間間隔問題を生じさせず、対象の毎時04分欠測パターンは再発しなかった。",
      "evidence_state": "VERIFIED",
      "confidence": "HIGH",
      "evidence_refs": [
        "O-005",
        "O-006",
        "O-007"
      ],
      "source_refs": []
    },
    {
      "id": "C-005",
      "statement_en": "The daily usage-time calculation problem should not be treated as a remaining failure of AIEL-2026-0007 because electricity-accumulation eligibility time, observation coverage, and power-on usage time are distinct quantities.",
      "statement_ja": "電力量積算対象時間、観測カバレッジ、電源ON利用時間は別の量であるため、日次利用時間算出問題をAIEL-2026-0007の未解決失敗として扱うべきではない。",
      "evidence_state": "VERIFIED",
      "confidence": "HIGH",
      "evidence_refs": [
        "O-008"
      ],
      "source_refs": []
    }
  ],
  "open_questions": [],
  "analysis": [
    {
      "id": "AN-001",
      "method": "pre_post_control_flow_and_raw_completeness_verification",
      "summary_en": "The retained source established a lock-before-observation early-return mechanism. After moving API acquisition before persistence locking and shortening shared lock scope, Raw-only validation covered all 34 expected minute-04 observations and all 411 expected five-minute cycles, with zero missing cycles, zero delayed-save markers, zero post-gap markers, zero intervals longer than seven minutes, and one isolated duplicate safely excluded from accumulation. The source mechanism and pre/post pattern jointly support ScriptLock contention as the primary cause of the targeted minute-04 gaps, while the absence of per-gap lock traces keeps that causal attribution at INFERRED rather than direct observation.",
      "summary_ja": "保持Sourceから観測前Lockとearly returnの欠測メカニズムを確認した。API取得を保存Lockより前へ移し共有Lock範囲を短縮した後、Rawだけの検証で毎時04分34/34、全5分周期411/411、欠測0、遅延保存0、欠測後観測0、7分超0を確認し、重複は積算対象外となった単発1件だけだった。Source上のメカニズムと修正前後パターンはScriptLock競合を対象04分欠測の主要原因として支持するが、各欠測時の直接Lock traceがないため因果帰属自体はINFERREDとする。",
      "evidence_refs": [
        "O-001",
        "O-002",
        "O-003",
        "O-005",
        "O-006",
        "O-007"
      ]
    }
  ],
  "results": {
    "status": "COMPLETED",
    "success_level": "SUCCESS",
    "summary_en": "The targeted minute-04 five-minute Raw missingness problem was resolved in the retained post-change validation window. All 34 expected minute-04 observations and all 411 expected five-minute cycles were present. No missing cycle, delayed-save marker, post-gap-observation marker, or interval longer than seven minutes was found. One isolated duplicate about 38.5 seconds after the preceding observation was safely excluded from accumulation and showed no recurrence trend.",
    "summary_ja": "対象とした毎時04分の5分Raw欠測問題は、保持された修正後検証期間では解消した。毎時04分34/34、期待5分周期411/411で、欠測0、遅延保存0、欠測後観測0、7分超間隔0だった。直前観測から約38.5秒後の重複1件は安全に積算対象外となり、再発傾向は確認されなかった。",
    "metrics": [
      {
        "name": "post_change_minute_04_expected",
        "value": 34,
        "unit": "observations",
        "quality": "VALID"
      },
      {
        "name": "post_change_minute_04_acquired",
        "value": 34,
        "unit": "observations",
        "quality": "VALID"
      },
      {
        "name": "post_change_minute_04_success_rate",
        "value": 100,
        "unit": "percent",
        "quality": "VALID"
      },
      {
        "name": "post_change_five_minute_cycles_expected",
        "value": 411,
        "unit": "cycles",
        "quality": "VALID"
      },
      {
        "name": "post_change_five_minute_cycles_observed",
        "value": 411,
        "unit": "cycles",
        "quality": "VALID"
      },
      {
        "name": "post_change_missing_cycles",
        "value": 0,
        "unit": "cycles",
        "quality": "VALID"
      },
      {
        "name": "post_change_delayed_save_count",
        "value": 0,
        "unit": "events",
        "quality": "VALID"
      },
      {
        "name": "post_change_post_gap_observation_count",
        "value": 0,
        "unit": "events",
        "quality": "VALID"
      },
      {
        "name": "post_change_duplicate_observation_count",
        "value": 1,
        "unit": "events",
        "quality": "VALID"
      },
      {
        "name": "post_change_interval_gt_7min_count",
        "value": 0,
        "unit": "intervals",
        "quality": "VALID"
      }
    ],
    "established_claim_refs": [
      "C-001",
      "C-002",
      "C-003",
      "C-004",
      "C-005"
    ],
    "unresolved_claim_refs": [],
    "disproven_claim_refs": []
  },
  "conclusion": {
    "en": "The retained pre-change source contained a verified failure mechanism: SwitchBot API acquisition depended on obtaining ScriptLock first, and a 20-second lock timeout could end the invocation without a Raw observation. The collector was changed so SwitchBot API acquisition occurs outside the lock, the acquisition time is fixed as observation time, and only the persistence section is briefly locked; the gas-side whole-process lock was likewise reduced to the write section. In the approximately 34-hour post-change Raw validation window, minute-04 acquisition was 34/34 and total five-minute coverage was 411/411, with zero missing cycles, zero delayed-save markers, zero post-gap-observation markers, and zero intervals longer than seven minutes. One isolated duplicate about 38.5 seconds after the preceding observation was safely excluded from accumulation and did not recur. Taken together, the verified failure mechanism and the matching pre/post behavior support long-held shared ScriptLock contention as the primary cause of the targeted minute-04 gaps. The repair is therefore considered effective for the problem tested here. Daily usage-time semantics are a separate follow-up and do not remain inside this completed Experiment.",
    "ja": "保持された修正前Sourceには、SwitchBot API取得がScriptLockの先行取得に依存し、20秒のLock timeoutでRaw観測を残さず実行終了し得るfailure mechanismが確認された。collectorはSwitchBot API取得をLock外へ移し、取得時刻を観測時刻として固定し、保存部分だけを短時間Lockする構造へ変更した。ガス側も処理全体Lockを廃止し書込み部分だけへ縮小した。修正後約34時間のRaw検証では毎時04分34/34、全5分周期411/411、欠測0、遅延保存0、欠測後観測0、7分超間隔0だった。直前観測から約38.5秒後の重複1件は安全に積算対象外となり再発しなかった。確認済みfailure mechanismと修正前後の挙動が一致するため、長時間保持された共有ScriptLockとの競合を対象04分欠測の主要原因と判断する。今回検証した問題に対する修正は有効である。日次利用時間の意味設計は別の後続課題であり、本Completed Experimentには残さない。",
    "evidence_basis_refs": [
      "C-001",
      "C-002",
      "C-003",
      "C-004",
      "C-005"
    ],
    "remaining_uncertainties": [
      "No direct per-gap ScriptLock trace was retained for every historical missing slot, so the causal attribution of the concentrated minute-04 pattern remains an evidence-based high-confidence inference.",
      "The post-change validation establishes the tested window and failure pattern; it does not guarantee that unrelated future API, trigger, or storage failures cannot occur."
    ],
    "recommended_next_actions": [
      "Keep the completed collector fix unchanged unless new Raw evidence shows recurrence of the same failure pattern.",
      "Handle daily usage-time calculation as a separate planned Experiment that distinguishes electricity-accumulation eligibility time, observation coverage, and power-on usage time."
    ]
  },
  "data_artifacts": [],
  "artifact_availability": {
    "private_five_minute_raw": {
      "retention": "RETAINED",
      "public": false,
      "notes": "Private Google Sheets Raw used for completion verification; identifiers and household telemetry are not published."
    },
    "production_apps_script_source": {
      "retention": "RETAINED",
      "public": false,
      "notes": "Production Apps Script source supporting the control-flow findings is retained privately."
    },
    "sanitized_analysis_output": {
      "retention": "NOT_RETAINED",
      "public": false,
      "notes": "No separate public aggregate artifact is required; the public article reports only the aggregate verification counts needed for the stated result."
    }
  },
  "sources": [],
  "provenance": {
    "generated_by": "AI-assisted analysis and documentation",
    "ai_systems": [
      {
        "system": "ChatGPT",
        "model": "GPT-5.6 Sol",
        "roles": [
          "experiment_scoping",
          "source_review",
          "raw_validation",
          "evidence_classification",
          "canonical_record_authoring"
        ]
      }
    ],
    "human_roles": [
      {
        "role": "project_governor/operator",
        "activities": [
          "approved and applied collector changes",
          "operated the private collection environment",
          "defined Raw-only completion verification",
          "approved separation of daily usage-time redesign into a follow-up"
        ]
      }
    ],
    "automation_systems": [
      {
        "system": "Google Apps Script time-driven triggers",
        "role": "scheduled data acquisition"
      }
    ],
    "human_editing": "The operator governed the implementation and completion criteria; AI performed the retained-source and Raw analysis and prepared the record."
  },
  "publication": {
    "public": true,
    "public_candidate": true,
    "draft_only": false,
    "languages": {
      "en": {
        "published": true,
        "url": "https://ai-experiment-log.pages.dev/en/experiments/google-apps-script-five-minute-raw-scriptlock-gaps/",
        "canonical": false
      },
      "ja": {
        "published": true,
        "url": "https://ai-experiment-log.pages.dev/ja/experiments/google-apps-script-five-minute-raw-scriptlock-gaps/",
        "canonical": false
      }
    },
    "machine_readable_url": "https://ai-experiment-log.pages.dev/data/experiments/AIEL-2026-0007/experiment.json",
    "primary_language": "en",
    "secondary_language": "ja",
    "publication_blockers": [],
    "content_review_protocol": "pre-publication-content-review-v1.4",
    "content_review_decision": "PASS",
    "reader_value_decision": "PASS",
    "publication_authorized": true,
    "publication_authorized_at": "2026-09-07T23:48:04+09:00"
  },
  "relationships": [
    {
      "type": "RELATED_TO",
      "experiment_id": "AIEL-2026-0001",
      "notes_en": "AIEL-2026-0001 used an independent five-minute Google Apps Script path while investigating SwitchBot stale-status behavior; AIEL-2026-0007 addresses collector-side missingness and ScriptLock placement rather than API staleness.",
      "notes_ja": "AIEL-2026-0001ではSwitchBot stale状態の切り分けに独立した5分Google Apps Script経路を用いた。AIEL-2026-0007はAPI staleではなくcollector側欠測とScriptLock配置を対象とする。"
    }
  ],
  "revisions": [
    {
      "revision": 1,
      "timestamp": "2026-09-06T18:17:12+09:00",
      "type": "INITIAL",
      "summary": "Created AIEL-2026-0007 as an IN_PROGRESS experiment from the retained September 6 collector redesign and Raw-validation activity."
    },
    {
      "revision": 2,
      "timestamp": "2026-09-07",
      "type": "COMPLETION",
      "summary": "Closed the targeted minute-04 Raw-missingness experiment as COMPLETED/SUCCESS after Raw-only verification showed minute-04 34/34, all five-minute cycles 411/411, zero missing cycles, zero delayed-save and post-gap markers, zero >7-minute intervals, and one isolated duplicate safely excluded from accumulation. Daily usage-time redesign was moved out of scope as a separate planned follow-up."
    },
    {
      "revision": 3,
      "timestamp": "2026-09-07T23:48:04+09:00",
      "type": "PUBLICATION_REVIEW",
      "summary": "Completed Pre-publication Content Review v1.4, Standalone Knowledge Review, Reader Value Review, bilingual/publication normalization, and explicit human publication authorization. Scientific results and last_verified were not changed; the record was staged as a publication candidate."
    },
    {
      "revision": 4,
      "timestamp": "2026-09-07T15:02:05+00:00",
      "type": "METADATA_UPDATE",
      "summary": "Gitleaks 8.24.3 full-history scan completed without detected leaks in GitHub Actions workflow run 34135796041 immediately before publication finalization; secret_scan_performed set to true."
    },
    {
      "revision": 5,
      "timestamp": "2026-09-07T15:02:05+00:00",
      "type": "PUBLICATION_UPDATE",
      "summary": "After human-approved merge to main, GitHub Actions workflow run 34135796041 directly observed the English page, Japanese page, and machine-readable JSON on Cloudflare Pages production. The JSON returned HTTP 200, matched experiment_id=AIEL-2026-0007, and matched the repository public copy byte-for-byte. Publication metadata was finalized from that observed state."
    }
  ],
  "security": {
    "contains_sensitive_data": true,
    "redactions_applied": true,
    "redaction_categories": [
      "spreadsheet_identifier",
      "device_identifier",
      "api_credential",
      "household_telemetry",
      "private_system_identifier"
    ],
    "secret_scan_performed": true,
    "publication_reviewed": true
  },
  "record_metadata": {
    "notes": {
      "en": [
        "The completion claim uses retained Raw-only post-change validation and does not rewrite historical Raw data.",
        "The single duplicate observation is recorded as a bounded integrity event, not as a missingness recurrence.",
        "Daily usage-time redesign is intentionally separated because electricity-accumulation eligibility time is not equivalent to observation coverage or power-on usage time."
      ],
      "ja": [
        "完了判定は保持Rawだけの修正後検証に基づき、過去Rawは書き換えていない。",
        "重複1件は欠測再発ではなく、既存防御で封じ込められた単発のintegrity eventとして記録する。",
        "日次利用時間再設計は、電力量積算対象時間が観測カバレッジや電源ON利用時間と同義ではないため意図的に別課題へ分離する。"
      ]
    }
  }
}
