Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class DigitAdapter(
*/
override fun accept(taskId: String, skillType: String, parameters: Map<String, Any>, startedAt: Instant): Acceptance {
if (!identity.complete) {
return Acceptance.Refused(Refusal.IDENTITY_UNSET, "기체 신원이 비어 있다")
return Acceptance.Refused(Refusal.IDENTITY_UNSET, "기체 식별 정보가 비어 있다")
}

val required = REQUIRED[skillType]
Expand Down Expand Up @@ -249,7 +249,7 @@ class DigitAdapter(
// **여기서 멈춘다.** 새 액션을 얹으면 지워지지 않은 것과 함께 돈다.
return Applied.Refused(
Refusal.LINK_ERROR,
"remove-action 이 성공했다는데 액션이 아직 running 이다(컨테이너 거동) — 겹쳐 돌지 않게 갱신을 멈춘다",
"remove-action 이 성공했다는데 액션이 아직 running 이다(컨테이너 동작) — 겹쳐 돌지 않게 갱신을 멈춘다",
)
}

Expand Down Expand Up @@ -296,7 +296,7 @@ class DigitAdapter(
current.state = TaskState.TASK_STATE_CANCELLED_RECOVERY_FAILED
return Applied.Refused(
Refusal.LINK_ERROR,
"remove-action 이 성공했다는데 액션이 아직 running 이다(컨테이너 거동)",
"remove-action 이 성공했다는데 액션이 아직 running 이다(컨테이너 동작)",
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class OrbitAdapter(
// **플릿의 거절은 정준 분류로 못 옮긴다** — 이유가 문자열 하나로 오고 값 집합이 없다.
is DispatchResult.Refused -> Acceptance.Refused(
Refusal.VENDOR_REJECTED,
"플릿이 파견을 거절했다: ${outcome.detail}",
"플릿이 파견을 거부했다: ${outcome.detail}",
FailureClass.FAILURE_CLASS_UNCLASSIFIED,
outcome.detail,
)
Expand Down Expand Up @@ -162,7 +162,7 @@ class OrbitAdapter(
"ORBIT_RUN_EVENTS_UNREADABLE",
FailureClass.FAILURE_CLASS_UNCLASSIFIED,
it.message ?: "",
"실행은 끝났는데 사건을 못 읽어 성패를 모른다",
"실행은 끝났는데 실행 이벤트를 못 읽어 성패를 모른다",
canAcceptNewTask = true,
)
return current.state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class OrbitHttpLink private constructor(
base("$API/$path/$suffix").header("Accept", JSON).GET().build(),
)
if (response.statusCode() / 100 != 2) {
error("Orbit 이 거절했다: HTTP ${response.statusCode()} ${response.body().take(ERROR_SNIPPET)}")
error("Orbit 이 거부했다: HTTP ${response.statusCode()} ${response.body().take(ERROR_SNIPPET)}")
}
val tree = mapper.readTree(response.body())
// 봉투가 둘이다 — 배열 그대로이거나 `resources` 안에 있다.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class SpotAdapter(
*/
override fun accept(taskId: String, skillType: String, parameters: Map<String, Any>, startedAt: Instant): Acceptance {
if (!identity.complete) {
return Acceptance.Refused(Refusal.IDENTITY_UNSET, "기체 신원이 비어 있다")
return Acceptance.Refused(Refusal.IDENTITY_UNSET, "기체 식별 정보가 비어 있다")
}

task?.takeIf { !it.state.isTerminal }?.let {
Expand Down Expand Up @@ -140,7 +140,7 @@ class SpotAdapter(
}

val sources = acquisition.imageSources().getOrElse {
return Acceptance.Refused(Refusal.LINK_ERROR, "취득 능력을 못 받았다: ${it.message}")
return Acceptance.Refused(Refusal.LINK_ERROR, "취득 케이퍼빌리티를 못 받았다: ${it.message}")
}
if (sources.isEmpty()) {
return Acceptance.Refused(Refusal.VENDOR_SURFACE_ABSENT, "취득할 영상 원천이 하나도 없다 — 찍을 것이 없다")
Expand All @@ -155,7 +155,7 @@ class SpotAdapter(

is AcquireResult.Rejected -> Acceptance.Refused(
Refusal.VENDOR_REJECTED,
"AcquireData 를 로봇이 거절했다: ${result.status}",
"AcquireData 를 로봇이 거부했다: ${result.status}",
failureClass = FailureClass.FAILURE_CLASS_UNCLASSIFIED,
vendorDetail = "AcquireDataResponse.status=${result.status.name}",
)
Expand All @@ -173,7 +173,7 @@ class SpotAdapter(
val command = link.command
?: return Acceptance.Refused(
Refusal.VENDOR_SURFACE_ABSENT,
"명령 계층이 없다 — 받아 놓고 아무것도 안 하는 것이 가장 나쁘므로 거절한다",
"명령 계층이 없다 — 받아 놓고 아무것도 안 하는 것이 가장 나쁘므로 거부한다",
)

val duration = number(parameters, P_DURATION)
Expand Down Expand Up @@ -310,7 +310,7 @@ class SpotAdapter(
is LeaseResult.Ok -> null
is LeaseResult.Rejected -> {
authorityLost = result.status
Acceptance.Refused(Refusal.CONTROL_AUTHORITY_LOST, "미션 적재가 리스로 거절됐다: ${result.status}")
Acceptance.Refused(Refusal.CONTROL_AUTHORITY_LOST, "미션 적재가 리스로 거부됐다: ${result.status}")
}
is LeaseResult.Failed ->
Acceptance.Refused(Refusal.LINK_ERROR, "미션 적재가 실패했다: ${result.cause.message}")
Expand All @@ -325,11 +325,11 @@ class SpotAdapter(
): Acceptance = when (result) {
is LeaseResult.Rejected -> {
authorityLost = result.status
Acceptance.Refused(Refusal.CONTROL_AUTHORITY_LOST, "리스가 거절됐다: ${result.status}")
Acceptance.Refused(Refusal.CONTROL_AUTHORITY_LOST, "리스가 거부됐다: ${result.status}")
}

is LeaseResult.Failed ->
Acceptance.Refused(Refusal.LINK_ERROR, "남쪽 호출이 실패했다: ${result.cause.message}")
Acceptance.Refused(Refusal.LINK_ERROR, "사우스바운드 호출이 실패했다: ${result.cause.message}")

is LeaseResult.Ok -> {
task = RunningTask(taskId, startedAt, layer, durationSeconds, TaskState.TASK_STATE_RUNNING)
Expand Down Expand Up @@ -582,7 +582,7 @@ class SpotAdapter(
Layer.MISSION -> updateMission(current, parameters)
Layer.ACQUISITION -> Applied.Refused(
Refusal.NO_VENDOR_PRIMITIVE,
"취득은 멈춤이 보장되지 않는다 — CancelAcquisition 이 STATUS_FAILED_TO_CANCEL 로 거절할 수 있고, " +
"취득은 멈춤이 보장되지 않는다 — CancelAcquisition 이 STATUS_FAILED_TO_CANCEL 로 거부할 수 있고, " +
"그러면 갱신이 취득 둘을 만든다",
)
Layer.COMMAND -> updateCommand(current, parameters, at)
Expand Down Expand Up @@ -712,7 +712,7 @@ class SpotAdapter(
Applied.Ok
}
CancelAcquisitionStatus.STATUS_FAILED_TO_CANCEL ->
Applied.Refused(Refusal.VENDOR_REJECTED, "로봇이 취득 취소를 거절했다 — 취득은 계속된다(CancelAcquisitionResponse.status=${answer.name})")
Applied.Refused(Refusal.VENDOR_REJECTED, "로봇이 취득 취소를 거부했다 — 취득은 계속된다(CancelAcquisitionResponse.status=${answer.name})")
CancelAcquisitionStatus.STATUS_REQUEST_ID_DOES_NOT_EXIST ->
Applied.Refused(Refusal.NO_TASK, "로봇이 이 취득 요청을 모른다(CancelAcquisitionResponse.status=${answer.name})")
CancelAcquisitionStatus.STATUS_UNKNOWN ->
Expand Down Expand Up @@ -778,12 +778,12 @@ class SpotAdapter(
is LeaseResult.Rejected -> {
authorityLost = result.status
onReject()
Applied.Refused(Refusal.CONTROL_AUTHORITY_LOST, "리스가 거절됐다: ${result.status}")
Applied.Refused(Refusal.CONTROL_AUTHORITY_LOST, "리스가 거부됐다: ${result.status}")
}

is LeaseResult.Failed -> {
onReject()
Applied.Refused(Refusal.LINK_ERROR, "남쪽 호출이 실패했다: ${result.cause.message}")
Applied.Refused(Refusal.LINK_ERROR, "사우스바운드 호출이 실패했다: ${result.cause.message}")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ object SiteBindingCheck {
AXES.mapNotNull { (axis, active, of) -> mismatch(axis, active(source), of, names, source) }
.joinToString(" · ") + ". 재등록하기 전까지 이 자리로 보내지 않는다"

else -> error("결속 검사가 내지 않는 거절이다: $refusal")
else -> error("결속 검사가 내지 않는 거부다: $refusal")
}

private fun mismatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ internal class Routing(private val robots: Map<String, HostedRobot>) {
fun enter(header: MessageHeader): HostedRobot {
val compatibility = RequestHeaders.compatibility(header)
if (compatibility.blocking) {
throw Status.FAILED_PRECONDITION.withDescription("계약 개정판이 호환되지 않는다: $compatibility").asRuntimeException()
throw Status.FAILED_PRECONDITION.withDescription("계약 리비전이 호환되지 않는다: $compatibility").asRuntimeException()
}
if (header.robotId.isBlank()) {
throw Status.INVALID_ARGUMENT.withDescription("요청 헤더에 robot_id가 없다 — §5.5는 gRPC 요청에 싣는다").asRuntimeException()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class HostedRobot(
current?.takeIf { !it.terminal }?.let {
return StartOutcome.Rejected(
RejectionCode.REJECTION_CODE_INVALID_TRANSITION,
"이미 도는 태스크가 있다: ${it.taskId} — 실물은 배타적 제어 모델이다(§4.9)",
"이미 도는 태스크가 있다: ${it.taskId} — 실제 하드웨어는 배타적 제어 모델이다(§4.9)",
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class G1Adapter(
if (!identity.complete) {
return Acceptance.Refused(
Refusal.IDENTITY_UNSET,
"기체 신원이 비어 있다 — G1은 신원을 말하지 않으므로 설정으로만 온다",
"기체 식별 정보가 비어 있다 — G1은 식별 정보를 말하지 않으므로 설정으로만 온다",
)
}
if (skillType != SKILL) {
Expand All @@ -89,7 +89,7 @@ class G1Adapter(
?: return Acceptance.Refused(
Refusal.VENDOR_SURFACE_ABSENT,
"고수준 서비스가 없다 — 시뮬레이터이거나 ai_sport 가 안 떠 있다. " +
"받아 놓고 아무것도 안 하는 것이 가장 나쁘므로 거절한다",
"받아 놓고 아무것도 안 하는 것이 가장 나쁘므로 거부한다",
)

task?.takeIf { !it.state.isTerminal }?.let {
Expand Down Expand Up @@ -139,7 +139,7 @@ class G1Adapter(
}
return Acceptance.Refused(
Refusal.VENDOR_REJECTED,
"SetVelocity 를 로봇이 거절했다: ${e.message}",
"SetVelocity 를 로봇이 거부했다: ${e.message}",
failureClass = failureClass,
vendorDetail = "${e.error?.name ?: "unnamed"} code=${e.rawCode}",
)
Expand Down Expand Up @@ -379,7 +379,7 @@ class G1Adapter(
* 하나이고 그것은 배터리이지 일이 아니다. 시간으로 나누면 그 숫자는 우리가 지은 것이다(§15.108).
*/
override fun progress(): ProgressObservation = ProgressObservation.NotObservable(
"벤더 표면에 태스크 진척이 없다 — 퍼센트는 AgvBmsState_.battery_percentage 뿐이고 그것은 배터리다",
"벤더 인터페이스에 태스크 진척이 없다 — 퍼센트는 AgvBmsState_.battery_percentage 뿐이고 그것은 배터리다",
)

/**
Expand Down
4 changes: 2 additions & 2 deletions client/src/main/kotlin/dev/picasso/client/cli/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fun main(args: Array<String>) {
if (!negotiated.accepted) {
// **거절을 삼키지 않는다.** 사유가 유일한 산출물이다(§5.4).
negotiated.rejectionsList.forEach {
err.println("협상 거절: ${it.code} — ${it.detail}")
err.println("협상 거부: ${it.code} — ${it.detail}")
}
exitProcess(ClientCli.REJECTED)
}
Expand All @@ -120,7 +120,7 @@ fun main(args: Array<String>) {
)
if (started.hasRejection()) {
val rejection = started.rejection
err.println("태스크 거절: ${rejection.code} — ${rejection.detail}")
err.println("태스크 거부: ${rejection.code} — ${rejection.detail}")
if (rejection.code == RejectionCode.REJECTION_CODE_UNSPECIFIED) exitProcess(1)
exitProcess(ClientCli.REJECTED)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ object ContractIdentity {
/** 시험이 부재를 확인할 수 있도록 스트림을 인자로 받는다. */
internal fun from(stream: InputStream?): Pair<String, String> {
val properties = Properties()
(stream ?: error("계약 신원 리소스를 찾을 수 없다: $RESOURCE")).use(properties::load)
(stream ?: error("계약 식별 정보 리소스를 찾을 수 없다: $RESOURCE")).use(properties::load)

val semver = properties.getProperty("semver").orEmpty()
val digest = properties.getProperty("digest").orEmpty()

// 파일은 있는데 키가 비는 경우가 있다 — 굽는 태스크가 반쯤 돈 경우다.
// 파일 존재만 보는 구현은 그것을 통과시킨다.
check(semver.isNotBlank()) { "계약 신원에 semver가 없다: $RESOURCE" }
check(digest.isNotBlank()) { "계약 신원에 digest가 없다: $RESOURCE" }
check(semver.isNotBlank()) { "계약 식별 정보에 semver가 없다: $RESOURCE" }
check(digest.isNotBlank()) { "계약 식별 정보에 digest가 없다: $RESOURCE" }

return semver to digest
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Check04CrossRef : GateCheck {
if (def == null) {
findings += Finding(
id, Severity.ERROR,
"계약에 없는 능력을 선언했다: ${s.skillType}@${s.major}. " +
"계약에 없는 케이퍼빌리티를 선언했다: ${s.skillType}@${s.major}. " +
"계약이 아는 것: ${index.skillTypes().sorted().joinToString(", ")}",
doc.locationOf("/skills/$i"),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import dev.picasso.profile.ProfileDocument
class Check06Vocabulary : GateCheck {

override val id = "6"
override val name = "능력 어휘 파괴와 확장·축소 분류"
override val name = "케이퍼빌리티 어휘 파괴와 확장·축소 분류"
override val requires = setOf(Resource.PROFILE_DOCUMENT, Resource.BASELINE)

override fun run(input: GateInput): CheckResult {
Expand Down Expand Up @@ -115,7 +115,7 @@ class Check06Vocabulary : GateCheck {

val same = siblings.firstOrNull { it.major == old.major }
if (same == null) {
val label = if (siblings.any { it.major > old.major }) "major 증가" else "능력 제거"
val label = if (siblings.any { it.major > old.major }) "major 증가" else "케이퍼빌리티 제거"
out += shrink(location, "$label: ${old.skillType}@${old.major}", old, registry, skipped)
return@forEach
}
Expand Down Expand Up @@ -219,7 +219,7 @@ class Check06Vocabulary : GateCheck {
return Finding(
id, Severity.WARNING,
"$what 가 $from → $to" +
if (withdrawn) " — 능력 철회다. §5.2가 분류하지 않아 막지 않는다" else "",
if (withdrawn) " — 케이퍼빌리티 철회다. §5.2가 분류하지 않아 막지 않는다" else "",
location,
)
}
Expand Down Expand Up @@ -401,7 +401,7 @@ class Check06Vocabulary : GateCheck {
.map { field ->
Finding(
id, Severity.WARNING,
"투영 필드가 바뀌었다: $field (${oldTree.get(field)} → ${newTree.get(field)})" +
"프로젝션 필드가 바뀌었다: $field (${oldTree.get(field)} → ${newTree.get(field)})" +
if (field == EXCLUSIVE) {
" — 소비자는 이제 자신이 유일한 명령자임을 전제해야 한다(§4.9)"
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Check07ModelBranching : GateCheck {
needles.filter { it in line }.map { needle ->
Finding(
id, Severity.ERROR,
"출하 소스에 기종 좌표가 있다: '$needle' " +
"프로덕션 소스에 기종 좌표가 있다: '$needle' " +
"— A-1의 '같은 클라이언트 코드'가 깨진다(설계 §11.2의 7번)",
"$label:${index + 1}",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Check11OutboundScope : GateCheck {
listOf(
Finding(
id, Severity.ERROR,
"출하 소스에서 아웃바운드를 여는 자리를 하나도 못 찾았다 — 탐색 방법이 낡았다",
"프로덕션 소스에서 아웃바운드를 여는 자리를 하나도 못 찾았다 — 탐색 방법이 낡았다",
MAIN,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class RevisionSuites(
val actual = client.capabilities(ROBOT)
if (actual != expected) {
failures += SuiteFailure(
"CONTRACT.capabilities", "프로파일의 투영",
"CONTRACT.capabilities", "프로파일의 프로젝션",
"응답 스킬=${actual.skillsList.map { "${it.skillType}@${it.major}.${it.minor}" }}",
)
}
Expand All @@ -126,7 +126,7 @@ class RevisionSuites(

/** 멈춘 상태가 계약상 올바른가. 올바르면 널, 아니면 관측값이다. */
private fun verdict(run: TaskRun, skill: SkillDeclaration, doc: ProfileDocument): String? {
run.rejection?.let { return "거절: $it" }
run.rejection?.let { return "거부: $it" }
val last = run.follower!!.updates.lastOrNull() ?: return "갱신 없음"
return when (last.state) {
TaskState.TASK_STATE_SUCCEEDED -> null
Expand Down Expand Up @@ -208,7 +208,7 @@ class RevisionSuites(
): RejectionCode? = harness(document).use { h ->
val client = h.client(CLIENT)
val started = client.start(ROBOT, "negative", 1, skill.skillType, MinimalParameters.of(skill, requiredOptionalKeys(expected)))
if (started.hasRejection()) error("유효한 태스크가 거절됐다: ${started.rejection.code} ${started.rejection.detail}")
if (started.hasRejection()) error("유효한 태스크가 거부됐다: ${started.rejection.code} ${started.rejection.detail}")
control(client, started.handle)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class RevisionTestRunner(
if (attempt == 0) "요청 ${claimed.requestId} 는 이미 끝났다" else "요청 ${claimed.requestId} 는 앞 보고가 반영됐다",
)
ReportReply.NotClaimer -> log("요청 ${claimed.requestId} 는 이 실행기가 집은 것이 아니다 — 버린다")
is ReportReply.Refused -> log("요청 ${claimed.requestId} 보고 거절 ${reply.status}: ${reply.body}")
is ReportReply.Refused -> log("요청 ${claimed.requestId} 보고 거부 ${reply.status}: ${reply.body}")
}
return
}
Expand Down
Loading
Loading