Bind a project's rung to its ladder in ProjectRung, and step an L 3 worker one rung up and an L 4 worker two up
CI / tests (pull_request) Failing after 3m48s
CI / tests (pull_request) Failing after 3m48s
This commit is contained in:
@@ -36,7 +36,7 @@ def reviewer_breaches(call: Call, environ: typing.Mapping[str, str], home: str)
|
||||
project, worker, escape_and_impact = handed(environ, ladder)
|
||||
if project is None or worker is None:
|
||||
return []
|
||||
required = ladder.review_rung(project, worker, escape_and_impact, kind, markdown_only(call.cwd))
|
||||
required = project.review_rung(worker, escape_and_impact, kind, markdown_only(call.cwd))
|
||||
named = named_rung(call.given, worker, ladder)
|
||||
if ladder.position(named) >= ladder.position(required):
|
||||
return []
|
||||
@@ -62,10 +62,10 @@ def skill_breaches(call: Call, environ: typing.Mapping[str, str], home: str) ->
|
||||
project, worker, _ = handed(environ, ladder)
|
||||
if project is None or worker is None:
|
||||
return []
|
||||
if not call.subagent and ladder.position(worker) >= ladder.position(project):
|
||||
if not call.subagent and ladder.position(worker) >= ladder.position(project.rung):
|
||||
return []
|
||||
runs_on = "on a rung rule-hook cannot see" if call.subagent else f"in this context on {worker}, below {project}"
|
||||
return [Breach("reviewer-rung", f"{skill} would run {runs_on}: invoke it from a subagent launched with {project.agent_args()}, its prompt opening with `{SECURITY_OPENER}`", call.cwd)]
|
||||
runs_on = "on a rung rule-hook cannot see" if call.subagent else f"in this context on {worker}, below {project.rung}"
|
||||
return [Breach("reviewer-rung", f"{skill} would run {runs_on}: invoke it from a subagent launched with {project.rung.agent_args()}, its prompt opening with `{SECURITY_OPENER}`", call.cwd)]
|
||||
|
||||
|
||||
def opening_prompt(transcript: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user