SaylorTwift HF Staff commited on
Commit
231d3f3
·
verified ·
1 Parent(s): e5f301b

Fix seam patch: target _opencode block by unique indent (3 apiKey seams exist)

Browse files
Files changed (1) hide show
  1. run_job.sh +7 -3
run_job.sh CHANGED
@@ -60,9 +60,13 @@ import openenv.harbor.seams as seams
60
 
61
  path = seams.__file__
62
  src = open(path).read()
63
- old = '"apiKey": session,'
64
- new = '"apiKey": session,\n "headers": {"x-api-key": session},'
65
- assert src.count(old) == 1, f"expected exactly one apiKey seam in {path}"
 
 
 
 
66
  open(path, "w").write(src.replace(old, new))
67
  print("patched", path)
68
  EOF
 
60
 
61
  path = seams.__file__
62
  src = open(path).read()
63
+ # Target only the _opencode seam: its apiKey/timeout pair at 24-space indent is
64
+ # unique (other harnesses share the strings at different indents).
65
+ old = '"apiKey": session,\n "timeout": 600_000,'
66
+ new = ('"apiKey": session,\n'
67
+ ' "headers": {"x-api-key": session},\n'
68
+ ' "timeout": 600_000,')
69
+ assert src.count(old) == 1, f"opencode seam not found in {path}"
70
  open(path, "w").write(src.replace(old, new))
71
  print("patched", path)
72
  EOF