Skip to content

fix: Rename SERVICE_PORT to PORT in github-issue demo manifest - #334

Merged
huang195 merged 2 commits into
rossoctl:mainfrom
huang195:fix/rename-service-port-to-port
Apr 21, 2026
Merged

huang195 merged 2 commits into
rossoctl:mainfrom
huang195:fix/rename-service-port-to-port

Conversation

@huang195

Copy link
Copy Markdown
Member

Summary

  • Rename SERVICE_PORT to PORT in authbridge/demos/github-issue/k8s/git-issue-agent-deployment.yaml

Context

The kagenti operator sets PORT (not SERVICE_PORT) during proxy-sidecar port-stealing. The agent-examples repo has been updated to read PORT instead of SERVICE_PORT (rossoctl/examples#254). This companion PR updates the demo deployment manifest to match.

Assisted-By: Claude (Anthropic AI) [email protected]

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 esnible left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@huang195
huang195 merged commit ea52dea into rossoctl:main Apr 21, 2026
17 checks passed
@huang195
huang195 deleted the fix/rename-service-port-to-port branch April 21, 2026 12:44
boazdavid added a commit to boazdavid/cortex that referenced this pull request Nov 24, 2026
…, 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]>
boazdavid added a commit to boazdavid/cortex that referenced this pull request Nov 24, 2026
…, 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants