oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package provider
2
3import (
4 "os"
5 "regexp"
6)
7
8var codexThreadLock = regexp.MustCompile(`^thread-writer-locks/[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\.lock$`)
9
10func codexTurnEntry(rel string, info os.FileInfo) error {
11 if !runtimeEntryMetadata(info) {
12 return accountContainment("runtime_codex_thread_metadata")
13 }
14 if codexThreadLock.MatchString(rel) && info.Mode().IsRegular() && info.Size() == 0 {
15 return nil
16 }
17 switch rel {
18 case ".sqlite-maintenance.lock":
19 if info.Mode().IsRegular() && info.Size() == 0 && info.Mode().Perm()&0113 == 0 {
20 return nil
21 }
22 case ".sandbox_migration":
23 if info.Mode().IsRegular() && info.Size() == 3 {
24 return nil
25 }
26 case "thread-writer-locks":
27 if info.IsDir() {
28 return nil
29 }
30 case "thread-writer-locks/.coordination.lock":
31 if info.Mode().IsRegular() && info.Size() == 0 {
32 return nil
33 }
34 }
35 return accountContainment("runtime_codex_thread_entry")
36}
37