+{"url":"https://api.github.com/repos/devbasex/devbase/pulls/comments/3474878988","pull_request_review_id":4571528229,"id":3474878988,"node_id":"PRRC_kwDOSHX-a87PHnIM","diff_hunk":"@@ -95,6 +95,32 @@ def list(self) -> list[dict]:\n snap['size_bytes'] = 0\n return snapshots\n \n+ def last_snapshot_time(self) -> Optional[datetime]:\n+ \"\"\"直近のスナップショット取得 (フル/差分) 日時を返す。\n+\n+ 各スナップショットディレクトリ内のアーカイブファイルの mtime のうち\n+ 最新のものを採用する。差分更新は既存ディレクトリ名を再利用するため\n+ (ディレクトリ名の日付は世代作成時のまま) ファイルの mtime を実測する方が\n+ 正確で、メタデータの整合性にも依存しない。\n+\n+ スナップショットが存在しない場合は None。\n+ \"\"\"\n+ if not self.backups_dir.exists():\n+ return None\n+ latest: Optional[float] = None\n+ for snap_dir in self.backups_dir.iterdir():\n+ if not snap_dir.is_dir():\n+ continue\n+ for f in snap_dir.iterdir():","path":"lib/devbase/snapshot/manager.py","commit_id":"f99f050fb2cb1d1d1d2609be1cab5b73a4ff2f7d","original_commit_id":"f99f050fb2cb1d1d1d2609be1cab5b73a4ff2f7d","user":{"login":"takemi-ohama","id":10234200,"node_id":"MDQ6VXNlcjEwMjM0MjAw","avatar_url":"https://avatars.githubusercontent.com/u/10234200?v=4","gravatar_id":"","url":"https://api.github.com/users/takemi-ohama","html_url":"https://github.com/takemi-ohama","followers_url":"https://api.github.com/users/takemi-ohama/followers","following_url":"https://api.github.com/users/takemi-ohama/following{/other_user}","gists_url":"https://api.github.com/users/takemi-ohama/gists{/gist_id}","starred_url":"https://api.github.com/users/takemi-ohama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takemi-ohama/subscriptions","organizations_url":"https://api.github.com/users/takemi-ohama/orgs","repos_url":"https://api.github.com/users/takemi-ohama/repos","events_url":"https://api.github.com/users/takemi-ohama/events{/privacy}","received_events_url":"https://api.github.com/users/takemi-ohama/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"[major / 正確性] 判定対象を `full.tar.zst` と `incr-*.tar.zst` に限定してください。現状は `meta.yml` や `snapshot.snar`/`.bak` の mtime でも直近スナップショット扱いになるため、コピーや失敗した差分作成後に成功したバックアップが無いまま `up` がスキップされます。","created_at":"2026-06-25T13:47:29Z","updated_at":"2026-06-25T13:48:08Z","html_url":"https://github.com/devbasex/devbase/pull/75#discussion_r3474878988","pull_request_url":"https://api.github.com/repos/devbasex/devbase/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/devbasex/devbase/pulls/comments/3474878988"},"html":{"href":"https://github.com/devbasex/devbase/pull/75#discussion_r3474878988"},"pull_request":{"href":"https://api.github.com/repos/devbasex/devbase/pulls/75"}},"reactions":{"url":"https://api.github.com/repos/devbasex/devbase/pulls/comments/3474878988/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"start_line":null,"original_start_line":null,"start_side":null,"line":114,"original_line":114,"side":"RIGHT","author_association":"MEMBER","original_position":20,"position":20,"subject_type":"line"}
0 commit comments