Repository navigation
fix: Rename SERVICE_PORT to PORT in github-issue demo manifest - #334
Conversation
Aligns with rossoctl/examples#254 which renamed the env var from SERVICE_PORT to PORT across all agents. The operator sets PORT during proxy-sidecar port-stealing. Signed-off-by: Hai Huang <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Hai Huang <[email protected]>
esnible
left a comment
There was a problem hiding this comment.
I will approve this because it is correct. I encourage you to add a comment to the YAML explaining the change.
The PR description implies this work is being done so that the deployment manifest matches what is produced by the Kagenti Operator. That's true, but I believe the best practice is that the Kagenti hosting environment tells the pod where to listen. That is broken in this example -- the container image hard-codes 8000.
https://github.com/kagenti/agent-examples/blob/main/a2a/git_issue_agent/Dockerfile#L15
We want deployment engineers to understand that kagenti uses $PORT as a suggestion for what port the agent expects to receive A2A traffic on. A comment to that effect will help.
Address review feedback: document that PORT tells the agent where to listen and that the operator may override it during proxy-sidecar port-stealing. Signed-off-by: Hai Huang <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Hai Huang <[email protected]>
…, correct Four real review findings on this layer: - OpenAI chat tools store their name in function.name, not the top-level name envelopeOps read. A removal among them matched nothing, fell back to the no-saving path, and lost the saving entirely. toolsOps now falls back to function.name before assigning the unnamed key. - A zero prompt-tier total (an error status with no prompt usage, or a context-guru call billed before an inference-router resend) dropped a completed operator spend along with the never-priced savings, because the gate in InferenceParser.accountant looked only at the prompt counters. Spend does not depend on them — each record prices from its own operator call. The gate now also asks when the request has a reported op. - One layer deeper: Host.Compute can refuse the whole request (a rejected status, or more than one upstream round) independent of the prompt total, which discarded the spend the same way. Host.Savings now reads the raw reported ops directly and prices any completed spend without going through Compute at all when it refuses — which also means a multi-round request's mismatched usage/body pair still cannot corrupt the thread's persisted cache-effect state for later requests, the actual reason Compute refuses. - A spend record carried no currency, so an operator's call to a different, differently-priced host (a credits-billed gateway beside a USD-endpoint call) was summed into the primary request's total as if it were the same unit. SpendRecord now carries Currency, SpendPrice returns it, and event.Figures skips a spend whose currency does not match the record's own rather than mixing units. Also dismissed 2 code-scanning alerts (clear-text-logging on the session id this package logs, log-injection on a request path it logs) as false positives, matching the repo's own precedent for the identical pattern (alerts rossoctl#359 and rossoctl#334 on main): the session id is validated before it is accepted, not a credential, and slog's TextHandler already quotes a value before it reaches the log. Assisted-By: Claude Sonnet 5 <[email protected]> Signed-off-by: DAVID BOAZ <[email protected]>
…, correct Four real review findings on this layer: - OpenAI chat tools store their name in function.name, not the top-level name envelopeOps read. A removal among them matched nothing, fell back to the no-saving path, and lost the saving entirely. toolsOps now falls back to function.name before assigning the unnamed key. - A zero prompt-tier total (an error status with no prompt usage, or a context-guru call billed before an inference-router resend) dropped a completed operator spend along with the never-priced savings, because the gate in InferenceParser.accountant looked only at the prompt counters. Spend does not depend on them — each record prices from its own operator call. The gate now also asks when the request has a reported op. - One layer deeper: Host.Compute can refuse the whole request (a rejected status, or more than one upstream round) independent of the prompt total, which discarded the spend the same way. Host.Savings now reads the raw reported ops directly and prices any completed spend without going through Compute at all when it refuses — which also means a multi-round request's mismatched usage/body pair still cannot corrupt the thread's persisted cache-effect state for later requests, the actual reason Compute refuses. - A spend record carried no currency, so an operator's call to a different, differently-priced host (a credits-billed gateway beside a USD-endpoint call) was summed into the primary request's total as if it were the same unit. SpendRecord now carries Currency, SpendPrice returns it, and event.Figures skips a spend whose currency does not match the record's own rather than mixing units. Also dismissed 2 code-scanning alerts (clear-text-logging on the session id this package logs, log-injection on a request path it logs) as false positives, matching the repo's own precedent for the identical pattern (alerts rossoctl#359 and rossoctl#334 on main): the session id is validated before it is accepted, not a credential, and slog's TextHandler already quotes a value before it reaches the log. Assisted-By: Claude Sonnet 5 <[email protected]> Signed-off-by: DAVID BOAZ <[email protected]>
Summary
SERVICE_PORTtoPORTinauthbridge/demos/github-issue/k8s/git-issue-agent-deployment.yamlContext
The kagenti operator sets
PORT(notSERVICE_PORT) during proxy-sidecar port-stealing. The agent-examples repo has been updated to readPORTinstead ofSERVICE_PORT(rossoctl/examples#254). This companion PR updates the demo deployment manifest to match.Assisted-By: Claude (Anthropic AI) [email protected]