Skip to content

Go watch and run-applications panels lose the player #260

Open

Description

@tony

Summary

The published Go landing page and Core page show the plain program, not the call-by-call player, for the run-applications and watch panels, while typed-graph still plays. A four-line comment change in libtmux-go made the displayed programs differ from the committed recording, and the player only plays a recording of the program it displays. Ruby's page plays all three programs.

Reproduction

  1. Run curl -sS https://libtmux.org/en/go/latest/ | grep -o 'data-results' | wc -l.
  2. Run the same command against https://libtmux.org/en/go/latest/core/ and https://libtmux.org/en/ruby/latest/.
  3. Read capabilities.run-applications and capabilities.watch in site/src/data/core-recordings/go.json at docs 983db91, then hash the two programs in libtmux-go at 2de249b and at master.

Expected

Each Go program the recording covers plays (data-results appears three times, as on the Ruby page).

Actual

https://libtmux.org/en/go/latest/       1
https://libtmux.org/en/go/latest/core/  1
https://libtmux.org/en/ruby/latest/     3

The recording hashes each program with sha256 over the program text without its final newline, and the hashes match libtmux-go 2de249b and no later revision:

                                           recording / 2de249b                                               449267f / master (8380c18)
examples/run-to-completion/main.go         6e3d739f8885fc64c5ae803ecf56aab08546162103f80efcc5efb17e6c578865  f467770e84764296c3fde0bc0351e4502a052dd5c23d9c844cfc019e7bfd2736
examples/control-mode-subscribe/main.go    ab45e0d2f462ce8f10c52c8bf105c3f999b2fd87b302c6b3f8812a124aee70aa  40b42f0bc92af6faedacd94955f4d4f7eab103bcb428175c5615eb8df9b46039

Environment

Revisions checked
  • docs 983db91.
  • go.json: top-level revision 449267f7cd1d4f7a495768665c47b7b1972ab00a; run-applications.revision and watch.revision both 2de249b600d65218ee8b8fdc07c6b2b919242151; typed-graph has no revision of its own, so it follows the top-level one.
  • libtmux-go: 2de249b, 449267f, master at 8380c18.

Evidence

  • The two programs differ between 2de249b and 449267f by one commit, libtmux-go@75e0fea (docs(fix): Match runtime guarantees), 4 lines added and 4 removed per file. The lines I read are comments, for example // A private server: a socket and an empty config of its own, so this becoming // Choose an unused socket name: cleanup kills the server selected here.
  • The recording stores program.sha256 as sha256(program.code) (gen-core-recording.mjs#L257), where code is the cached program text with a trailing newline removed (common.mjs#L34-L39). The recipes name examples/run-to-completion/main.go and examples/control-mode-subscribe/main.go (go.mjs#L156-L160, go.mjs#L175-L177). Hashing those files with the final newline removed reproduces the recorded values at 2de249b.
  • The recorded hashes are at go.json#L1251-L1256 and go.json#L2020-L2025.
  • recordingProblems reports is of a different program than the one displayed when the hashes differ (core-recording.ts#L113), and playableCapability then returns no player so the page keeps the plain example (core-player.ts#L48-L53).
  • The published Go pages contain the new comment text Choose an unused socket name, so they display the 449267f-era programs.
  • Not verified: the exact revision the published Go build read the programs from, and that the hash comparison is the failing check in the build (I did not run the site build).

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions