fix(harness): allow product learnings to be edited - #179
Conversation
Product KB spaces already show agent-written L pages as editable, but the chain validator rejected them as unknown. Declare Learning on the product chain so PATCH saves succeed.
|
Not blocking this — just linking it up. I'd been reproducing #36 separately and posted what I found on the issue: the trigger turns out to be the space config rather than a writer, since Declaring |
Agreed - this matches what I was seeing too. The orphan comes from the config swap/research default, not the writers: chainFromConfig falls through to research, and PUT /kb/space can swap the chain without rechecking stored pages. Same thing can strand H/E/F/CR/SR, and S/D/T/V/R the other way. I’d rather refuse a chain change that would leave existing types illegal, and default product spaces to chain: "product". Soft-allowing unknown types on PATCH feels like recovery, not the real fix. Product Learning vs Literature L is a separate naming call either way. Please open your patch as a PR alongside this one - it shouldn’t conflict, and both can be reviewed and merged. |
|
Opened it as #195. I took a couple of days before posting — I wanted to run my own findings against the It doesn't touch |
adrian-lorenzo
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
Adding L to the Product chain makes sense, but this leaves the repository with conflicting definitions of that chain: the runtime validator calls L “Learning,” while the seeded product-chain contract and the Product KB documentation do not declare it. The web also labels every L entry as a learning even though the Research chain defines L as Literature. Please update these representations together and add coverage that the UI label follows the selected chain, so L has one clear meaning within each workspace.
Summary
This PR fixes Product KB edits for existing
Llearning entries. The Product workspace already treats learnings as normal editable artifacts, but the backend validator rejects them in Product spaces becauseLis only declared in the research chain. As a result, a user can open and edit a learning page in the UI, but saving fails withunknown_artifact_type.The fix aligns the Product artifact-chain contract with the UI by adding
Las a supported Product KB type. Regression coverage proves both the harness validator and the API PATCH route accept an existing Product-space learning entry.Expected user impact:
Lpages withunknown_artifact_type.Lan explicit Product type instead of bypassing unknown-type checks.Fixes #36
Test plan
accepts product learningspassesedits existing product learning entriespassesunknown_artifact_type