feat(issues): link filed issues to originating conversation turns#301
feat(issues): link filed issues to originating conversation turns#301castor-agent wants to merge 3 commits into
Conversation
…rule (#194) Add a session-start instruction that retrieves the issue_filing_consent preference entity at startup and caches it for the session. When the stored value is "always", the effective reporting mode is set to proactive and the agent MUST file issues without asking. Values "ask" and "never" map to consent and off respectively. The preference overrides issues.reporting_mode from config and env for the duration of the session. Also update the proactive mode contract to explicitly list issue_filing_consent value "always" as a trigger alongside the CLI config and env var paths, replacing the obsolete future auto_file_issues forward reference. Update QA-driven issue filing to check for the stored preference entity before prompting the user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements POST /issues/import endpoint and `neotoma issues import --from-jsonl <file>` CLI command for observer batch ingestion of issues from JSONL files exported from other systems. - openapi.yaml: new POST /issues/import endpoint (operationId: importIssuesFromJsonl) - src/shared/openapi_types.ts: regenerated from updated spec - src/shared/action_schemas.ts: IssuesImportFromJsonlRequestSchema (Zod) - src/services/issues/import_from_jsonl.ts: new service; parses JSONL, builds deterministic idempotency keys, stores each issue entity - src/actions.ts: handleIssuesImportFromJsonlHttp handler + routes - src/tool_definitions.ts: import_issues_from_jsonl MCP tool - src/shared/contract_mappings.ts: importIssuesFromJsonl row + MCP map entry - src/cli/issues.ts: issuesImport function + IssuesImportOpts interface - src/cli/index.ts: `issues import --from-jsonl <file>` subcommand - scripts/security/protected_routes_manifest.json: regenerated (109 routes) Fixes #271 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds optional `conversation_turn_id` to `submit_issue` (MCP tool, HTTP POST /issues/submit, and IssuesSubmitRequestSchema). When provided, the server creates a REFERS_TO edge from the filed issue entity to the specified conversation_message entity so the origin of the issue is directly traceable without a separate create_relationship call. Changes: - openapi.yaml: add `conversation_turn_id` field to issuesSubmit requestBody - src/shared/openapi_types.ts: regenerated - src/services/issues/types.ts: add `conversation_turn_id` to IssueCreateParams - src/shared/action_schemas.ts: add field to IssuesSubmitRequestSchema - src/services/issues/issue_operations.ts: merge conversation_turn_id into the allTargetIds list fed to createRelationships alongside entity_ids_to_link - src/server.ts: parse and forward conversation_turn_id in MCP handler - src/actions.ts: forward conversation_turn_id in HTTP handler - src/tool_definitions.ts: expose conversation_turn_id param on submit_issue tool - docs/developer/mcp/instructions.md: note that agents SHOULD pass conversation_turn_id when the current turn entity ID is known Fixes #192 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @castor-agent's task —— View job PR Review In Progress
|
|
@claude review |
|
Claude finished @castor-agent's task —— View job PR Review In Progress
|
/create_pr skill auditAutomated audit against the Verdict: does not fully meet standards. Gaps below; recommended changes follow each item. Findings
Recommended changesUpdate the PR description to match the skill template exactly: ## Problems
- <Concrete pain point or gap.>
## Solutions
- <Concrete change made.>
## UX improvements
- <User-visible behavior change, or `No user-visible change.`>
## Documentation
- <docs/... path(s) added or updated; parameters/outputs/examples/error modes covered.>
- <`docs/site/site_doc_manifest.yaml` entry added/updated; docs service tests pass.>
- <Or: `No functional change; no user-facing docs required.`>
## Test plan
- [ ] `npm run type-check`
- [ ] `npm test`
- [ ] `npm test -- src/services/docs` (if docs changed)
- [ ] Manual verification: <steps>
## Breaking changes
No breaking changes.
## Related
- Plan: <Neotoma plan entity_id or docs/ path>
- Issue(s): <#N>
🤖 Generated with [Claude Code](https://claude.com/claude-code)Functional surfaces detected from the diff: CLI, HTTP, MCP. Per the skill, the Posted by |

Fixes #192
Adds optional
conversation_turn_idtosubmit_issue— when provided, a REFERS_TO edge is created from the filed issue to the conversation turn entity where the problem was observed.Summary
openapi.yaml: new optionalconversation_turn_idfield onissuesSubmitrequest body; describes theconversation_messageentity ID of the turn where the issue was observedsrc/services/issues/types.ts:IssueCreateParams.conversation_turn_id?: stringsrc/shared/action_schemas.ts:IssuesSubmitRequestSchemaincludes the new fieldsrc/services/issues/issue_operations.ts: mergesconversation_turn_idinto the REFERS_TO batch alongsideentity_ids_to_link— no second DB round-tripsrc/server.ts+src/actions.ts: MCP handler and HTTP handler both parse and forward the fieldsrc/tool_definitions.ts:submit_issueMCP tool exposes the new param with descriptiondocs/developer/mcp/instructions.md:[ISSUE REPORTING]section notes agents SHOULD passconversation_turn_idwhen the current turn entity ID is knownTest plan
npm run type-check— passes (verified locally)npm run lint— passes (0 errors, pre-existing warnings only)npm run format:check— passes after prettier runnpm run validate:doc-deps— passesNEOTOMA_HTTP_PORT=0 npx vitest run)submit_issuewithconversation_turn_idset to a knownconversation_messageentity ID; verify a REFERS_TO edge appears from the issue entity to the turn entity🤖 Generated with Claude Code