diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-23 19:54:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-23 19:54:08 +0900 |
| commit | 0b9834a90b20a90908acc8f698742c7218450008 (patch) | |
| tree | 8361267d7481fffafada762ff40de4c42c57b155 /crates/shirabe-php-rpc/src/value.rs | |
| parent | 0b48f4a46d24248e4c012ef37d25b5963c27a78c (diff) | |
| download | php-shirabe-0b9834a90b20a90908acc8f698742c7218450008.tar.gz php-shirabe-0b9834a90b20a90908acc8f698742c7218450008.tar.zst php-shirabe-0b9834a90b20a90908acc8f698742c7218450008.zip | |
docs(plugin): bring boundary text in line with the implementation
Comments that pointed at design notes kept outside the repository are dead
ends for anyone reading only the tree, so what each of them explained now
lives in a tagged TODO at the site it applies to. Several of those sites
also stated something the implementation does not do, and the TODOs record
the actual gap instead: the two halves of the codec recognize handle
descriptors by different rules, the scripts Command path drops the exception
class and collects output in a BufferedOutput that cannot carry an
interactive command, find_shortest_path panics where PHP throws, and the
package dispatch hand-rolls the variant selection AnyPackage should own.
The classifier document likewise described rust-snapshot,
plugin-constructible and several of the open questions as designed rather
than as built.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-rpc/src/value.rs')
| -rw-r--r-- | crates/shirabe-php-rpc/src/value.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/shirabe-php-rpc/src/value.rs b/crates/shirabe-php-rpc/src/value.rs index c19c386f..7203c9fb 100644 --- a/crates/shirabe-php-rpc/src/value.rs +++ b/crates/shirabe-php-rpc/src/value.rs @@ -612,6 +612,13 @@ fn parse_quoted(payload: &[u8], pos: &mut usize, terminator: u8) -> anyhow::Resu } /// Recognizes the reserved handle-descriptor arrays by their exact key sets. +/// +/// TODO(type-model): a descriptor travels in-band as a plain array, so its exact key set is the +/// only thing separating it from plugin data of the same shape. An array that carries a reserved +/// key without matching a descriptor's whole key set is user data and should decode as an array; +/// it is a decode error here instead, and that is the fatal lane, so a plugin passing +/// `['__rhandle' => 1]` to a proxied method takes the channel down with it. The PHP half +/// (`fromWire` in `php/worker.php`) diverges the other way, matching on the reserved key alone. fn decode_handle(entries: &IndexMap<Vec<u8>, PluginValue>) -> anyhow::Result<Option<PluginValue>> { let get = |key: &[u8]| entries.get(key); |
