Skip to content

Feature/#98#101

Merged
vkehfdl1 merged 3 commits intodevfrom
feature/#98
Apr 10, 2026
Merged

Feature/#98#101
vkehfdl1 merged 3 commits intodevfrom
feature/#98

Conversation

@vkehfdl1
Copy link
Copy Markdown
Contributor

Summary

  • add a new subway-lost-property skill for official subway lost-property guidance
  • ship a Python helper that builds LOST112 search payloads and optional live reachability probes
  • document and test the v1 hybrid scope across README/install/docs and regression suites

Verification

  • python3 -m unittest scripts.test_subway_lost_property
  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live
  • npm run ci

Issue #98 was approved as a conservative implementation: structure the official LOST112 and 서울교통공사 workflows instead of pretending a stable public API exists. The new helper builds the documented search payload, the docs explain the v1 hybrid scope, and regression coverage locks the helper plus repo docs into the shipped flow.

Constraint: Public subway lost-property APIs remain unconfirmed, so v1 must stay guidance-first
Rejected: Full automated scraping of live result tables | unstable without confirmed API/session guarantees
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep this skill on official HTTPS entry points until a stable public API is verified end-to-end
Tested: python3 -m unittest scripts.test_subway_lost_property; python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live; npm run ci
Not-tested: Browser-only user journey through LOST112 search submission beyond payload generation
@vkehfdl1
Copy link
Copy Markdown
Contributor Author

REQUEST CHANGES

HIGHsubway-lost-property/scripts/subway_lost_property.py:114-119
The helper’s advertised curl_example is not actually runnable as emitted. I verified this locally on 2026-04-10:

  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live returned both official sources as reachable (LOST112 fetched 74830 bytes, 서울교통공사 fetched 127030 bytes).
  • Executing the generated curl_example verbatim returned curl: (28) Operation timed out after 20009 milliseconds with 0 bytes received (returncode=28).
  • A control POST with the same LOST112 form fields plus -e https://www.lost112.go.kr/ succeeded (returncode=0, stdout_len=67044).

That means the core example the docs/skill tell users to rely on is currently broken in practice, even though the reachability probe passes. The impact is amplified because docs/features/subway-lost-property.md:38-60 and subway-lost-property/SKILL.md:55-78 explicitly steer users to this helper-generated curl flow.

MEDIUMscripts/test_subway_lost_property.py:44-60
The regression only asserts that the generated command string contains SITE=V; it never validates that the emitted request shape is usable (or even that any required headers are present). That gap is why the broken curl_example above still passes CI.

Real Result

  • python3 -m unittest scripts.test_subway_lost_propertyRan 8 tests in 0.001s / OK
  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live ✅ returned reachable statuses for both official sources
  • npm run ci ✅ passed locally
  • Generated curl_example ❌ timed out until a referer was added

Recommendation: REQUEST CHANGES

The review found that the generated subway lost-property curl example still timed out even when the helper's reachability probe passed. This change updates the helper to emit the command shape that actually succeeds against LOST112, tightens the regression test to lock that contract, and aligns the published skill/docs text with the runnable output users now receive.

Constraint: LOST112 POST flow requires a referer and does not behave reliably with the prior redirect-following command shape
Constraint: Keep the v1 scope hybrid/guidance-only without adding new dependencies or scraping guarantees
Rejected: Only add a referer header while leaving the rest of the curl shape unchanged | still reproduced timeouts with the generated command during verification
Rejected: Add a live network regression test for the emitted curl command | would make CI flaky and violate deterministic regression expectations
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If the LOST112 request shape changes again, re-verify the emitted curl command end-to-end before updating docs or tests
Tested: python3 -m unittest scripts.test_subway_lost_property; python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live; generated curl_example executed via shell and wrote lost112-search-result.html; npm run ci
Not-tested: Alternate LOST112 item/station combinations beyond the verified 강남역/지갑 example
@vkehfdl1
Copy link
Copy Markdown
Contributor Author

Fixed the review-blocking LOST112 curl guidance so the helper now emits the command shape that actually runs against the official site.

  • updated the helper to emit a runnable POST example with the required referer, no redirect-following on the form submission path, and an explicit lost112-search-result.html output file
  • strengthened the Python regression to assert the emitted curl contract instead of only checking for SITE=V
  • aligned the skill/doc wording with the runnable curl output users now receive

Verification:

  • python3 -m unittest scripts.test_subway_lost_property
  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live
  • executed the generated curl_example in shell (exit 0, wrote lost112-search-result.html)
  • npm run ci

@vkehfdl1
Copy link
Copy Markdown
Contributor Author

Round 2 review: I reran $code-review plus local verification on the curl-fix path, and I did not find any remaining blocking issues.

What I checked:

  • subway-lost-property/scripts/subway_lost_property.py:119-126 now emits the POST example with --referer https://www.lost112.go.kr/, --output lost112-search-result.html, and no -L on the form-submit path.
  • scripts/test_subway_lost_property.py:45-68 now locks that emitted curl contract instead of only checking SITE=V.
  • docs/features/subway-lost-property.md:38-69 and subway-lost-property/SKILL.md:59-78 match the helper’s actual output/behavior.

Real Result

  • python3 -m unittest scripts.test_subway_lost_propertyRan 8 tests in 0.001s / OK
  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live ✅ returned both sources as reachable on 2026-04-10:
    • LOST112: fetched 74887 bytes
    • 서울교통공사: fetched 127030 bytes
  • Executed the generated curl_example verbatim ✅
    • returncode=0
    • wrote lost112-search-result.html
    • observed output size: 77880 bytes
  • npm run ci ✅ passed locally (root lint/typecheck/test/pack dry-run plus workspace suites)

The original blocker from round 1 appears resolved in practice: the helper-generated curl is now runnable against LOST112, the regression covers the required request shape, and the docs/skill no longer over-promise a broken command.

Recommendation: APPROVE

@vkehfdl1
Copy link
Copy Markdown
Contributor Author

Verified the approved LOST112 curl-example fix on feature/#98 and confirmed the branch is ready for merge.

  • reran python3 -m unittest scripts.test_subway_lost_property and confirmed the subway lost-property regression suite still passes
  • reran python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live on 2026-04-10 and confirmed both official sources were reachable
  • executed the emitted curl_example verbatim and confirmed it returned exit code 0 and wrote lost112-search-result.html
  • reran npm run ci successfully
  • completed a STANDARD-tier architect verification pass with no remaining merge blockers; residual risk remains limited to external LOST112/Seoul Metro site drift or latency already documented as v1 hybrid/manual fallback behavior

@vkehfdl1
Copy link
Copy Markdown
Contributor Author

Round 3 review: reran $code-review plus local verification, and I found one remaining blocker.

HIGHsubway-lost-property/scripts/subway_lost_property.py:119-126
The helper still does not emit a reliably runnable LOST112 curl_example in practice. The request-shape fix from round 1 helped, but the command now hard-codes --max-time 20, and that budget is still too aggressive for the live LOST112 POST path. I reran the exact emitted command verbatim on 2026-04-10 and it returned curl: (28) Operation timed out after 20005 milliseconds with 0 bytes received (final returncode=28) and did not write lost112-search-result.html, even though --verify-live reported LOST112 as reachable. A control POST with the same payload/referer and only a longer timeout (--max-time 60) succeeded (returncode=0). Because docs/features/subway-lost-property.md:38-40 and subway-lost-property/SKILL.md:66-78 still tell users this helper emits a runnable curl flow, the user-facing guidance remains broken under current real-world latency.

MEDIUMscripts/test_subway_lost_property.py:61-68
The regression locks the referer/output/request-shape contract, but it still does not protect the timeout budget or any other behavior that would catch the above failure mode. That is why CI remains green while the exact emitted curl_example can still fail in live use.

Real Result

  • python3 -m unittest scripts.test_subway_lost_propertyRan 8 tests in 0.001s / OK
  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live ✅ on 2026-04-10 returned both official sources as reachable:
    • LOST112: fetched 75028 bytes
    • 서울교통공사: fetched 127030 bytes
  • Exact emitted curl_example executed verbatim ❌
    • final returncode=28
    • stderr included curl: (28) Operation timed out after 20005 milliseconds with 0 bytes received
    • lost112-search-result.html was not created
  • Control POST with the same LOST112 form fields/referer but --max-time 60
    • returncode=0
  • npm run ci ✅ passed locally

Recommendation: REQUEST CHANGES

The helper's emitted POST example still timed out against LOST112 in live
verification because the 20-second timeout budget was too short for the
observed form-submit path. Raise the generated timeout to 60 seconds,
lock that contract in the regression, and align the skill/doc wording so
users receive guidance that matches the runnable command.

Constraint: LOST112 live POST latency can exceed 20 seconds even when reachability probes succeed
Rejected: Keep 20 seconds and rely on manual retry | still ships a broken default curl_example
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If the timeout budget changes again, rerun the exact emitted curl_example against LOST112 rather than only the lightweight reachability probe
Tested: python3 -m unittest scripts.test_subway_lost_property
Tested: python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live
Tested: npm run ci
Not-tested: Long-term LOST112 latency drift beyond the currently observed 60-second budget
@vkehfdl1
Copy link
Copy Markdown
Contributor Author

Addressed the remaining round-3 blocker on feature/#98.

  • raised the helper-emitted LOST112 curl_example timeout budget from --max-time 20 to --max-time 60 so the default POST example matches the live latency we observed on 2026-04-10
  • extended the Python regression to lock the timeout contract in addition to the referer/output/request-shape checks
  • aligned the feature doc and skill wording so the advertised runnable curl flow explicitly matches the helper output

Verification:

  • python3 -m unittest scripts.test_subway_lost_property
  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live
  • executed the emitted curl_example verbatim earlier in this follow-up and confirmed returncode=0 with lost112-search-result.html written under the new timeout budget
  • npm run ci

@vkehfdl1
Copy link
Copy Markdown
Contributor Author

APPROVE

Short reason: the previously blocking LOST112 curl-example issue is resolved in the current PR state, and I did not find any remaining merge blockers in the helper/docs/test path.

Real Result (verified on 2026-04-10):

  • python3 -m unittest scripts.test_subway_lost_propertyRan 8 tests in 0.001s / OK
  • python3 scripts/subway_lost_property.py --station 강남역 --item 지갑 --days 14 --verify-live ✅ reported both official sources reachable:
    • LOST112: fetched 74931 bytes
    • 서울교통공사: fetched 127030 bytes
  • Executed the emitted curl_example from the helper output verbatim ✅
    • final returncode=0
    • wrote lost112-search-result.html
    • observed output size: 77830 bytes
    • the command did print a transient curl: (28) Operation timed out after 60004 milliseconds with 0 bytes received warning to stderr before succeeding via retry, but the emitted command completed successfully and produced the expected HTML artifact
  • npm run ci ✅ exited 0

Concrete evidence checked:

  • subway-lost-property/scripts/subway_lost_property.py now emits --referer https://www.lost112.go.kr/, --max-time 60, --output lost112-search-result.html, and the LOST112 POST target.
  • scripts/test_subway_lost_property.py locks the emitted curl contract including the 60-second timeout budget.
  • docs/features/subway-lost-property.md and subway-lost-property/SKILL.md match the helper’s current runnable guidance.

Residual risk remains limited to external LOST112/서울교통공사 latency or site drift, which is already consistent with the documented v1 hybrid/manual-fallback scope.

@vkehfdl1 vkehfdl1 merged commit d7e0406 into dev Apr 10, 2026
1 check passed
@vkehfdl1 vkehfdl1 deleted the feature/#98 branch April 10, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant