Closed gentlementlegen closed 3 weeks ago
I was reviewing this action run and its a lot more clear to me when looking at the clean JSON logs exactly whats going on here. I realized that the scoring is implemented incorrectly. The primary crediting strategy is supposed to be based on the amount of elements. The word counter is a separate scoring mechanism. This was added as an after thought in version one, but it seems that you prioritized word count over element count.
The problem is that the original emphasis on element count allows us to easily target and credit special and useful elements such as <a>
, <img>
, and <code>
. Helpful comments generally have links, images and code samples.
<p>
7
<code>
Now you are keeping track of word count PER element which is more complex than it needs to be. Remember, the word count scoring strategy was added as an after thought for version one. Version one simply counts all the words in the comment (but also ignores words in specific elements, like code
.) at the end of all the complex calculations.
Aside from the ignore capability, it doesn't care which element contains the words.
{
"id": 2014495969,
"content": "Wouldn't solve scenarios requiring keys or credentials",
"url": "https://github.com/ubiquity/cloudflare-deploy-action/issues/6#issuecomment-2014495969",
"type": "ISSUE_ASSIGNEE",
"score": {
"formatting": {
"content": {
"p": {
"count": 7, // should be changed to `wordCount` and you should correctly count the amount of `p` tags to be `elementCount`
"score": 1
}
},
"wordValue": 0,
"formattingMultiplier": 0
},
"reward": 0,
"relevance": 0.3
}
}
p
scoring to be 0
but our word scoring to be 0.1
for a grand total of 0.7
. 0
. 2.8
but then multiply by relevance to yield a sum of 0.84
for the comment.@gentlementlegen we don't have label pricing which is a big problem for switching to the new bot.
Does it need to have the ubiquity:listeners
on its manifest? https://ubiquibot-assistive-pricing.ubiquity.workers.dev/manifest.json
@gentlementlegen not sure what else to do here, but it doesn't seem to listen to the label events.
@0x4007 I am looking at it but we are doing the same actions at the same time haha. Probably the configuration is not valid, gimme a minute.
@0x4007 It seems to run fine but answers with a 403
when executed.
I have no idea about what to do with that.
I suspect this is the culprit: https://github.com/ubiquibot/assistive-pricing/blob/478942e5f25e4dfad8f85b219900b699aa804b9f/src/worker.ts#L44
I suspect this is the culprit: https://github.com/ubiquibot/assistive-pricing/blob/478942e5f25e4dfad8f85b219900b699aa804b9f/src/worker.ts#L44
So this is some old auth mechanism? Should we remove it from the secrets and the code?
@0x4007 I am attempting to redeploy with the proper key value. If don't know if I have the proper one. If you wanna change it: https://github.com/ubiquibot/assistive-pricing/settings/secrets/actions then go to Actions and run Deploy
on the main branch.
This is necessary for every plugin? Doesn't seem right.
I just updated the public key.
It should be in the future for security purposes if I recall. It was only implemented there though.
Remade to reduce clutter
# Issue was not closed as completed. Skipping.
@0x4007 Remember our good friend
"InvalidCharacterError: atob() called with invalid base64-encoded data. (Only whitespace, '+', '/', alphanumeric ASCII, and up to two terminal '=' signs when the input data length is divisible by 4 are allowed.)"
Did you set line breaks or no line breaks?
Oh I used the x25519 public key. We really need to change the property name to be APP_PUBLIC_KEY
Updated to the correct key.
@0x4007 Key seems to give a 403
. Not sure about the expected logic there, I think @whilefoo had implemented this one. I can temporarily comment that logic maybe?
Yes lets remove authentication
@0x4007 Works without the auth, to be added back later.
I don't see the need for auth but thanks for fixing.
Also
score
should just sum per instance. For example if we want to award $1 for every paragraph, thenscore
forp
should be1
.score
is not supposed to be a multiplier.However in the config I believe we also support a
multiplier
property. This should be separate fromscore
._Originally posted by @0x4007 in https://github.com/ubiquibot/conversation-rewards/pull/68#discussion_r1721049100_