reasoning: ground unclassified answers without category expansion

This commit is contained in:
2026-08-10 08:20:00 +01:00
parent 4ea664d0d8
commit 69efc5d1b9
2 changed files with 63 additions and 5 deletions
+18 -3
View File
@@ -2804,6 +2804,16 @@ function proposalResolutionSummary(proposal) {
return { resolved, proposalText };
}
function resolvedProposalMeaningText(proposal) {
return normaliseSemanticText(
(proposal.updatedNodes || [])
.filter((update) => update.newStatus === "resolved")
.map((update) => update.newValue)
.filter((value) => typeof value === "string" && value.trim().length > 0)
.join(" "),
);
}
function mentionsHardConstraint(text) {
return (
text.includes("hard constraint") ||
@@ -3040,13 +3050,18 @@ function validateAnswerMeaningAlignment(proposal) {
}
if (supportCategory === "other") {
const resolvedMeaningText = resolvedProposalMeaningText(proposal);
if (
resolved &&
containsConstraintBoundaryLanguage(proposalText) &&
!containsConstraintBoundaryLanguage(meaningText)
resolvedMeaningText &&
!rawAnswerSupportsUnclassifiedMeaning(
proposal.answerMeaning.userSupportedMeaning,
resolvedMeaningText,
)
) {
errors.push(
"Proposal cannot resolve beyond an unclassified answer by introducing an unsupported constraint or preference/trade-off distinction.",
"Proposal cannot resolve beyond an unclassified answer by introducing unsupported stronger meaning than answerMeaning.userSupportedMeaning establishes.",
);
}
}