@@ -207,6 +207,40 @@ def test_status_reports_missing_remote_without_treating_local_ref_as_network(tmp
207207 assert payload ["remote_fullrepo_exists" ] is False
208208
209209
210+ def test_bootstrap_init_skips_missing_compatible_overlay (monkeypatch ) -> None :
211+ printed : list [dict [str , object ]] = []
212+
213+ monkeypatch .setattr (
214+ mod ,
215+ "_project_policy" ,
216+ lambda : {"effective" : {"fullrepo" : {"mode" : "auto" , "install_exclude" : False }}},
217+ )
218+ monkeypatch .setattr (mod , "enforce_fullrepo_policy" , lambda * _args , ** _kwargs : None )
219+ monkeypatch .setattr (mod , "repo_root" , lambda : Path ("/repo" ))
220+ monkeypatch .setattr (mod , "iter_worktree_agent_files" , lambda _root : [])
221+ monkeypatch .setattr (mod , "fetch_fullrepo" , lambda _remote , _branch : True )
222+ monkeypatch .setattr (mod , "tracked_agent_paths_in_index" , lambda : [])
223+ monkeypatch .setattr (mod , "status" , lambda _remote , _branch : {"ok" : True })
224+ monkeypatch .setattr (mod , "print_status" , lambda payload , as_json = False : printed .append (payload ))
225+
226+ def fail_restore (* _args , ** _kwargs ):
227+ raise mod .FullrepoError (
228+ "no compatible fullrepo overlay found in refs/remotes/origin/fullrepo "
229+ "for source abc (tree def)"
230+ )
231+
232+ monkeypatch .setattr (mod , "restore" , fail_restore )
233+
234+ mod .bootstrap_init ("origin" , "fullrepo" )
235+
236+ assert printed == [
237+ {
238+ "ok" : True ,
239+ "bootstrap_actions" : ["restore-skipped-no-compatible-overlay" ],
240+ }
241+ ]
242+
243+
210244def test_publish_uses_identity_env_fallback (tmp_path : Path , monkeypatch ) -> None :
211245 _ , work = init_repo (tmp_path )
212246 monkeypatch .chdir (work )
0 commit comments