Summary
The write-proxy-config helper is not idempotent when it is run more than once against the same action home directory.
Each run writes a fresh action-managed proxy selection and provider table around the existing config.toml contents. If the helper runs twice, the config can contain duplicate root provider selections and duplicate proxy provider tables. The stale port from the first run can also remain in the file.
Reproduction
- Create a temporary action home directory.
- Run
write-proxy-config once with port 1111.
- Run
write-proxy-config again against the same home directory with port 2222.
- Inspect
config.toml.
Expected behavior
The helper should replace its own managed proxy config and leave exactly one managed provider selection and one managed provider table. Re-running with a new port should update the managed table to the new port.
Actual behavior
The helper appends/prepends another managed config entry, leaving duplicate provider selections/tables and potentially retaining a stale port.
Notes
This is related to #80, but narrower: this issue is only about idempotency of the action-managed proxy config. PR #104 contains a focused fix for this case.
Summary
The
write-proxy-confighelper is not idempotent when it is run more than once against the same action home directory.Each run writes a fresh action-managed proxy selection and provider table around the existing
config.tomlcontents. If the helper runs twice, the config can contain duplicate root provider selections and duplicate proxy provider tables. The stale port from the first run can also remain in the file.Reproduction
write-proxy-configonce with port1111.write-proxy-configagain against the same home directory with port2222.config.toml.Expected behavior
The helper should replace its own managed proxy config and leave exactly one managed provider selection and one managed provider table. Re-running with a new port should update the managed table to the new port.
Actual behavior
The helper appends/prepends another managed config entry, leaving duplicate provider selections/tables and potentially retaining a stale port.
Notes
This is related to #80, but narrower: this issue is only about idempotency of the action-managed proxy config. PR #104 contains a focused fix for this case.