Skip to content

Commit e48995a

Browse files
fryanpanclaude
andcommitted
ADFA-4128 (3/11): address CodeRabbit review
- F1715-1 stop the response contract claiming values are never arrays Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FstXxJ5cwWPcvmhZ9vJgJ7
1 parent a94afb0 commit e48995a

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎quickbuild/protocol/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Six ops: `configure`, `compile`, `dex`, `relink`, `ping`, `shutdown`.
5757

5858
### Responses
5959

60-
`{"id", "ok", <op values, flat>, "diagnostics"}`. Values are flat scalars, never nested.
60+
`{"id", "ok", <op values, flat>, "diagnostics"}`. Values are flat - never a nested object.
61+
They are JSON scalars apart from `classesChanged`, which is an array of strings.
6162

6263
- `diagnostics` **can appear on success** - a build can succeed with warnings.
6364
- **`line` and `column` are JSON numbers, and they stop here.** CoGo keeps error positions for

‎quickbuild/protocol/src/main/kotlin/org/appdevforall/cotg/quickbuild/protocol/DaemonProtocol.kt‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,17 +456,19 @@ data class DexStats(
456456
}
457457

458458
/**
459-
* The daemon's answer to one request. [values] holds the op-specific scalars (`classesDir`,
460-
* `dexFile`, `resourcesArsc`, `durationMillis`, ...), serialized flat into the response object.
459+
* The daemon's answer to one request. [values] holds the op-specific values (`classesDir`,
460+
* `dexFile`, `resourcesArsc`, `durationMillis`, ...), serialized flat into the response object -
461+
* never a nested object. `classesChanged` is the one array.
461462
*
462463
* Adding a response key must not bump [PROTOCOL_VERSION]: the version is a hard gate that aborts
463464
* the session on mismatch, and a staged daemon jar can lag the client, so bumping it for an
464465
* additive field would break a pairing that would otherwise work.
465466
*
466467
* @property id the [DaemonRequest.id] this answers; the client's only correlation handle.
467468
* @property ok whether the op succeeded, false implying at least one ERROR in [diagnostics].
468-
* @property values op-specific scalars, flat and JSON-scalar-only, keyed by the `KEY_*` constants
469-
* and [ResponseKeys], so a client may read one key and ignore the rest.
469+
* @property values op-specific values, flat - never a nested object - and JSON scalars apart
470+
* from `classesChanged`, which is an array of strings. Keyed by the `KEY_*` constants and
471+
* [ResponseKeys], so a client may read one key and ignore the rest.
470472
* @property diagnostics compiler and linker messages, present on success too since a build can
471473
* succeed with warnings.
472474
*/

0 commit comments

Comments
 (0)