sshivaditya2019 / test-public

0 stars 0 forks source link

Consolidated Comment Per Plugin Chain Run ID #178

Open sshivaditya2019 opened 1 day ago

sshivaditya2019 commented 1 day ago

Right now its messy that every plugin posts their own comments.[^01^] It allows for flexibility but I think its a bad idea for it to be the main way.

I propose we have a method that lets the developer pass in the comment data and the kernel posts the comment on behalf of the plugin.

The important part is that the comment has special metadata, a run ID, that includes the Cloudflare KV run UUID.

And when other plugins in the chain want to leave a comment, it appends in its own divided section (using the plugin ID) The kernel can have a custom parser that can manipulate the comment per plugin section (or "field") with the help of the metadata.

The plugin developers are abstracted away from these low level details, and instead just have to worry about passing strings to the kernel to do the heavy lifting with.

The primary method should have appending behavior, but we should also support clobbering (replacing the comment content, limited to only the section/field controlled by the plugin)

A simplified example of a section separator:

The parser can identify section separators with a regex and parse out each plugin's output.

[^01^]: ⚠ 80% possible duplicate - Consolidated Comment Per Plugin Chain Run ID

0x4007 commented 1 day ago

That should be a 100% string match why is it only 80%? I presume it considers the entire specification as part of the calculation?