weiqingy opened a new pull request, #972:
URL: https://github.com/apache/flink-agents/pull/972

   Linked issue: filing shortly
   
   ### Purpose of change
   
   Two Python samples on the doc site call APIs that do not exist, so a reader 
who copies either one gets an immediate failure. Other pages already spell both 
correctly, so this is drift rather than a convention.
   
   `docs/content/docs/operations/configuration.md:51` called 
`agents_env.get_configuration()`. That method is not declared anywhere. The 
real one is `get_config`, at 
`python/flink_agents/api/execution_environment.py:163`. Five other doc 
locations already use `get_config`, and the Java snippet further down the same 
page was already correct.
   
   `docs/content/docs/development/tool_use.md:192` imported `Agent` from 
`flink_agents.api.agents`. That package's `__init__.py` is the license header 
alone, so the import raises `ImportError`. 
`docs/content/docs/development/skills.md:94` uses the path that works.
   
   Two known documentation issues are deliberately not in this PR. `yaml.md` 
describes a schema export that `SchemaParityTest` does not perform, which is a 
prose rewrite with more than one defensible correction. And two pairs of pages 
share a front-matter `weight`, which needs a decision about intended sidebar 
order rather than a defect fix. Both will be filed separately so an 
uncontroversial fix is not held up by an open question.
   
   ### Tests
   
   No test harness executes documentation snippets, so both fixes were verified 
by running the code directly.
   
   The import was checked in both directions against the source tree. `from 
flink_agents.api.agents.agent import Agent` resolves to `<class 
'flink_agents.api.agents.agent.Agent'>`, and the previous form raises 
`ImportError: cannot import name 'Agent' from 'flink_agents.api.agents'`, with 
the traceback pointing at the checked-out `__init__.py` rather than an 
installed wheel. The other two imports in the same snippet, `decorators.tool` 
and `tools.InjectedArg`, both resolve, and so does `InjectedArg.from_config`, 
so the corrected block works as a whole.
   
   The configuration sample cannot be executed without a live gateway, so it 
was verified by introspection instead. `RemoteExecutionEnvironment` is the only 
`AgentsExecutionEnvironment` subclass, so the sample's type is unambiguous. On 
it, `hasattr(env, "get_configuration")` is false while `get_config` returns 
`AgentConfiguration`. The methods the sample then calls on that object, 
`set_int(key, value)` and `set(option, value)`, both exist with matching 
argument shapes, so correcting the getter does not leave a broken chain behind 
it.
   
   `./tools/check-license.sh` passes.
   
   ### API
   
   No. Documentation only, no code or public API change, and no runtime 
behavior changes.
   
   ### Documentation
   
   - [x] `doc-included`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   - [x] Yes
   
   `Generated-by: Claude Code 2.1.223`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to